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

Signature mismatch when the server behind proxy #12

Open
Zolli opened this issue Mar 20, 2018 · 1 comment
Open

Signature mismatch when the server behind proxy #12

Zolli opened this issue Mar 20, 2018 · 1 comment

Comments

@Zolli
Copy link

Zolli commented Mar 20, 2018

Hi,

I found an issue, when the server (API server) behinds a proxy server, the generated signatures are not equals. It's because the Escher::authenticate() method absolutely not care with the proxy headers.

Scenario:
The client sign the request with host: b.website.com, but this host is a proxy that redirects the request to a.website.com.
In this case the client uses the b.website.com host to signs the request, but the server uses the a.website.com host.

Proposal:
When getting the host from the request, first check if any X-Forwarded-* header are present and use this address as host.

@Zolli
Copy link
Author

Zolli commented Jul 11, 2018

Any news on this?

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

No branches or pull requests

1 participant