mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-06-23 11:50:13 +00:00
chore: more rabbit comments
This commit is contained in:
@@ -335,7 +335,17 @@ func (controller *OAuthController) isRedirectSafe(redirectURI string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if u.Port() != au.Port() {
|
||||
getEffectivePort := func(u *url.URL) string {
|
||||
if u.Port() != "" {
|
||||
return u.Port()
|
||||
}
|
||||
if u.Scheme == "https" {
|
||||
return "443"
|
||||
}
|
||||
return "80"
|
||||
}
|
||||
|
||||
if getEffectivePort(u) != getEffectivePort(au) {
|
||||
controller.log.App.Warn().Msg("Redirect URI port does not match app URL port")
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user