start save users

This commit is contained in:
2026-08-09 03:25:20 -07:00
parent 1a46e23ae4
commit 844bfb323c
2 changed files with 21 additions and 4 deletions
+3 -3
View File
@@ -145,9 +145,9 @@ func FinishRegistration(w http.ResponseWriter, r *http.Request) {
user := datastore.GetOrCreateUser(string(session.UserID)) // Get the user
var username = strings.Trim(user.WebAuthnName(), " \r\n\t")
if username == "" {
l.Printf("[ERROR] SaveUser: Empty username")
msg := fmt.Sprintf("\"Error\": \"Can't finish registration: Empty username\"")
if len(username) < 2 {
l.Printf("[ERROR] SaveUser: Username too short")
msg := fmt.Sprintf("Error: Can't finish registration: Username too short")
http.SetCookie(w, &http.Cookie{
Name: "sid",
Value: "",