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

Api returning 403 on wrong referer #1521

Closed
krl opened this issue Jul 26, 2015 · 5 comments
Closed

Api returning 403 on wrong referer #1521

krl opened this issue Jul 26, 2015 · 5 comments
Milestone

Comments

@krl
Copy link
Contributor

krl commented Jul 26, 2015

In the api browserify testsuite, i need to make api requests with referer set to localhost and some arbitrary port.

https://github.com/ipfs/go-ipfs/blob/master/commands/http/handler.go#L84

This however sends me a 403.

@jbenet i think this is the same issue you had with the federated wiki thing. I talked to @diasdavid and he suspected that this is outdated code since #1215 - could we simply remove this block?

@jbenet
Copy link
Member

jbenet commented Jul 27, 2015

Yeah, this is incorrect.

I have a fix in the works https://github.com/ipfs/go-ipfs/compare/cors-fix but it's not done yet. (anyone feel free to pick it up.)

I'd like to rebase this on top of #1519

@krl
Copy link
Contributor Author

krl commented Jul 28, 2015

@mappum could this be safely removed right now? given that #1215 is merged

@jbenet
Copy link
Member

jbenet commented Jul 28, 2015

@mappum what was the problem with the referer? (does correct CORS take care of it?)

cc @diasdavid

@jbenet jbenet modified the milestone: IPFS 0.3.6 Jul 28, 2015
@jbenet
Copy link
Member

jbenet commented Jul 28, 2015

i believe it's a CSRF that we were worried about: https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Checking_The_Referer_Header

o/ says checking referer isnt so great. i think proper CORS fixes things

@jbenet
Copy link
Member

jbenet commented Jul 28, 2015

addressed in #1529

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

2 participants