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

HOTFIX: Reflect origin header for CORS auth #126

Merged
merged 2 commits into from
Aug 20, 2017
Merged

Conversation

Mr0grog
Copy link
Member

@Mr0grog Mr0grog commented Aug 20, 2017

Looks like I broke remote authentication in e70230a. An upgrade to rack-cors changed the behavior of origins '*' such that it now does not reflect the request's origin and instead actually sends '*' for the allowed origins header. That means authentication on our requests fails :(

See this change in rack-cors: cyu/rack-cors#142

We needed this behavior initially because it seemed like Authorization headers in our requests were getting stripped, but it seems like this may no longer be true (or, more likely, I mis-diagnosed the issue originally). That needs more testing, though. For now, force rack-cors to return to its earlier behavior.

I broke remote authentication in e70230a. An upgrade to rack-cors changed the behavior of `origins '*'`
such that it now does not reflect the request's origin and instead actually sends '*' for the allowed origins header. That means authentication on our requests fails :(

See this change in rack-cors: cyu/rack-cors#142

We needed this behavior initially because it seemed like `Authorization` headers in our requests were getting stripped, but it seems like this may no longer be true. That needs more testing, though. For now, force rack-cors to return to its earlier behavior.

 Please enter the commit message for your changes. Lines starting
@Mr0grog
Copy link
Member Author

Mr0grog commented Aug 20, 2017

Side note for the curious: we largely work around the associated vulnerability here by disallowing cookie data on all remote requests.

@Mr0grog Mr0grog deleted the hotfix-origin-auth branch March 22, 2018 06:42
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.

1 participant