SHA256
start save users
This commit is contained in:
@@ -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: "",
|
||||
|
||||
Reference in New Issue
Block a user