From c2458f14fd5251f663b9b2ecfe98f304cd0391da Mon Sep 17 00:00:00 2001 From: Noah Date: Wed, 7 Sep 2022 21:29:35 -0700 Subject: [PATCH] Make username case insensitive on Privacy Grant page --- pkg/controller/photo/private.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controller/photo/private.go b/pkg/controller/photo/private.go index 8c69845..23ae2df 100644 --- a/pkg/controller/photo/private.go +++ b/pkg/controller/photo/private.go @@ -3,6 +3,7 @@ package photo import ( "fmt" "net/http" + "strings" "code.nonshy.com/nonshy/website/pkg/config" "code.nonshy.com/nonshy/website/pkg/log" @@ -61,7 +62,7 @@ func Share() http.HandlerFunc { // To whom? var ( user *models.User - username = r.FormValue("to") + username = strings.TrimSpace(strings.ToLower(r.FormValue("to"))) isRevokeAll = r.FormValue("intent") == "revoke-all" )