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

Remove or fix referer header for file downloader #674

Open
G1org1owo opened this issue Aug 16, 2024 · 0 comments
Open

Remove or fix referer header for file downloader #674

G1org1owo opened this issue Aug 16, 2024 · 0 comments

Comments

@G1org1owo
Copy link

This was introduced all the way back in ab493a0, but I have noticed how it creates some problems with yande.re in particular. When making a request to an image such as this with an explicit Referer: header which does not belong to the domain yande.re, the host returns the post html page instead of the actual image.

This causes szurubooru not to recognize the received file and throw an "Unhandled file type: 'application/octet-stream'" error.

I have not opened a pull request as I believe this should be discussed first, but I see no easy way to dynamically retrieve the correct referrer and therefore think the header should be scrapped altogether. Moreover, it is currently set as if the request was coming from the target URL itself, which I'm pretty sure isn't the correct usage of the header anyways.

Is there something that would break, were it to be removed?

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