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
Create direct share link for "koofr" backend #5398
Conversation
Instead of creating link to web interface, create direct link usable by curl(1) or wget(1).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave this a quick test with curl
- it works fine there.
However wget
doesn't and if you open the link in the browser you'll see the reason why
Hotlinking not allowed.
Visit this page to see this link
So I guess curl is putting a Referer:
from the same site in.
Other than that it seems to work.
So code-wise it all looks fine.
However this is circumventing Koofr's hotlink protection by the look of it which they could change to be a more secure method very easily.
Given that, do you think I should merge this?
I do not promise to maintain this patch forever, but I think it is making life better for now (for curl-based applications), and when (should?) they break it, it should not be hard to revert this patch. |
Maybe it worth adding warning that URL generated may not work in all applications, e.g
|
@ncw So, what is your take on this? |
If it is working for you as-is then I think we should merge it. If you are happy with the code as it is, then I'll do exactly that! |
I am happy as much as I can be with such non-accommodating provider. |
okay, it's blessed, let's merge this :) |
What is the purpose of this change?
Was the change discussed in an issue or in the forum before?
Checklist