nandi/gleanpublic⑂ Fork 0
⑂ 774c583
Commits
⬇ Clone ▾
git clone https://git.rickub.com/nandi/glean.git
git clone ssh://git@rickub.com/nandi/glean.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Strip possible leading @ from handle in auth loginUnverified

Julien Robert committed 2026-04-22T02:50:32+02:00 Browse files
774c583 parent: 62c1d08
modified internal/server/auth_handler.go +2 -1
@@ -6,6 +6,7 @@ import (
66 "fmt"
77 "net/http"
88 "net/url"
9+ "strings"
910 "os"
1011
1112 "github.com/bluesky-social/indigo/atproto/syntax"
@@ -20,7 +21,7 @@ func (s *Server) handleAuthLogin(w http.ResponseWriter, r *http.Request) {
2021 }
2122
2223 func (s *Server) handleAuthStart(w http.ResponseWriter, r *http.Request) {
23- handle := r.FormValue("handle")
24+ handle := strings.TrimPrefix(r.FormValue("handle"), "@")
2425 if handle == "" {
2526 http.Error(w, "handle required", http.StatusBadRequest)
2627 return
@@ -6,6 +6,7 @@ import (
6 "fmt"6 "fmt"
7 "net/http"7 "net/http"
8 "net/url"8 "net/url"
9+ "strings"
9 "os"10 "os"
10 11
11 "github.com/bluesky-social/indigo/atproto/syntax"12 "github.com/bluesky-social/indigo/atproto/syntax"
@@ -20,7 +21,7 @@ func (s *Server) handleAuthLogin(w http.ResponseWriter, r *http.Request) {
20 }21 }
21 22
22 func (s *Server) handleAuthStart(w http.ResponseWriter, r *http.Request) {23 func (s *Server) handleAuthStart(w http.ResponseWriter, r *http.Request) {
23- handle := r.FormValue("handle")24+ handle := strings.TrimPrefix(r.FormValue("handle"), "@")
24 if handle == "" {25 if handle == "" {
25 http.Error(w, "handle required", http.StatusBadRequest)26 http.Error(w, "handle required", http.StatusBadRequest)
26 return27 return