mirror of
https://github.com/project-zot/zot.git
synced 2026-06-19 05:57:57 +08:00
fix(auth): prevent open redirect via callback_ui (#3844)
Validate callback_ui and default invalid values to /. Allow absolute callback_ui only when its origin is allowlisted via http.auth.openid.callbackAllowOrigins (and externalUrl). Add/adjust unit + controller tests and update examples/docs for relative vs allowlisted absolute redirect Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
This commit is contained in:
@@ -22,6 +22,8 @@ const (
|
||||
SessionClientHeaderValue = "zot-ui"
|
||||
APIKeysPrefix = "zak_"
|
||||
CallbackUIQueryParam = "callback_ui"
|
||||
SchemeHTTP = "http"
|
||||
SchemeHTTPS = "https"
|
||||
APIKeyTimeFormat = time.RFC3339
|
||||
// CreatePermission is an authz permission for create actions.
|
||||
CreatePermission = "create"
|
||||
|
||||
Reference in New Issue
Block a user