Skip to content

Unset all possible dash/underscore combinations of REMOTE_USER#1181

Merged
ekohl merged 1 commit intomasterfrom
remote-user
Sep 4, 2024
Merged

Unset all possible dash/underscore combinations of REMOTE_USER#1181
ekohl merged 1 commit intomasterfrom
remote-user

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
@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