Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unset all possible dash/underscore combinations of REMOTE_USER #1182

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Sep 4, 2024

While the backend will always see underscores, as dashes are not permitted in environment variables that are used to pass these along, the frontend should always filter all possible notations, as otherwise an attacker could set the "REMOTE-USER" header which gets passed as "REMOTE_USER" unfiltered.

Do the same for REMOTE_USER_* to avoid sneaking in groups that the user does not belong to and other user preferences. This however is only a theoretical attack vector once you can't spoof the REMOTE_USER variable anymore.

(cherry picked from commit 80f1229)

While the backend will always see underscores, as dashes are not
permitted in environment variables that are used to pass these along,
the frontend should always filter all possible notations, as otherwise
an attacker could set the "REMOTE-USER" header which gets passed as
"REMOTE_USER" unfiltered.

Do the same for REMOTE_USER_* to avoid sneaking in groups that the
user does not belong to and other user preferences.
This however is only a theoretical attack vector once you can't
spoof the REMOTE_USER variable anymore.

(cherry picked from commit 80f1229)
@evgeni evgeni merged commit f28c54a into 24.2-stable Sep 4, 2024
15 checks passed
@evgeni evgeni deleted the 24.2-remote-user branch September 4, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants