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

Verify origin when upgrading websocket #452

Merged
merged 1 commit into from
Mar 30, 2020
Merged

Conversation

ericfranz
Copy link
Contributor

This adds a second test for origin, along with the csrf token, which can be disabled by setting the env var OOD_SHELL_ORIGIN_CHECK to any string not starting with http.

This by default uses X-Forwarded-Proto and X-Forwarded-Host which Apache mod_proxy should be setting.

It doesn't handle the case where X-Forwarded-Host contains multiple values or it is needed to have multiple valid values to check against - which is why the ability to disable it is present.

Copy link
Contributor

@johrstrom johrstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericfranz ericfranz merged commit 9681f3d into master Mar 30, 2020
@ericfranz ericfranz deleted the shell_origin_test branch March 30, 2020 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants