summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-04-25 23:01:48 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-04-25 23:01:48 +0200
commit26d70f0ea7b8dc84b2451b3965d9e81d7b25a9a8 (patch)
tree3483f8759c3926557af030bebbc46951f0db761f
parent718740398fd8c3cf81d8412756b1db5ce7cef6aa (diff)
downloadshopping-list-26d70f0ea7b8dc84b2451b3965d9e81d7b25a9a8.tar.gz
shopping-list-26d70f0ea7b8dc84b2451b3965d9e81d7b25a9a8.zip
fix password_length check
-rw-r--r--authenticate/authenticate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/authenticate/authenticate.go b/authenticate/authenticate.go
index e0f2ddd..9341d14 100644
--- a/authenticate/authenticate.go
+++ b/authenticate/authenticate.go
@@ -162,7 +162,7 @@ func RegisterPOST(c *gin.Context) {
 		return
 	}
 
-	if len(password) <= 0 && len(password) <= 72 {
+	if len(password) <= 0 || len(password) > 72 {
 		c.HTML(http.StatusBadRequest, "register.html", gin.H{
 			"error": "Invalid password",
 		})