Skip to content

Commit e4141da

Browse files
committed
Made a fix for shuffler.io accounts
1 parent 627f282 commit e4141da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

shared.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22428,6 +22428,13 @@ func HandleOpenId(resp http.ResponseWriter, request *http.Request) {
2242822428
return
2242922429
}
2243022430

22431+
if strings.Contains(strings.ToLower(userName), "shuffler.io") {
22432+
log.Printf("[ERROR] Username (%v) contains invalid domain in OpenID login for org: %v", userName, org.Id)
22433+
resp.WriteHeader(401)
22434+
resp.Write([]byte(`{"success": false, "reason": "Invalid username"}"`))
22435+
return
22436+
}
22437+
2243122438
users, err := FindGeneratedUser(ctx, strings.ToLower(strings.TrimSpace(userName)))
2243222439
if err == nil && len(users) > 0 {
2243322440
for _, user := range users {

0 commit comments

Comments
 (0)