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 #1181

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.

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.
@ekohl ekohl added the Bug label Sep 4, 2024
@ekohl ekohl enabled auto-merge (rebase) September 4, 2024 13:35
@ekohl ekohl merged commit 80f1229 into master Sep 4, 2024
19 checks passed
@ekohl ekohl deleted the remote-user branch September 4, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants