Make username case insensitive on Privacy Grant page

pull/12/head
Noah 2022-09-07 21:29:35 -07:00
parent 0c45befac5
commit c2458f14fd
1 changed files with 2 additions and 1 deletions

View File

@ -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"
)