The Wayback Machine - https://web.archive.org/web/20230228133939/https://github.com/rclone/rclone/pull/5398
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

Create direct share link for "koofr" backend #5398

Merged
merged 1 commit into from Oct 23, 2021

Conversation

KAction
Copy link

@KAction KAction commented Jun 10, 2021

What is the purpose of this change?

Was the change discussed in an issue or in the forum before?

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

Instead of creating link to web interface, create direct link usable by
curl(1) or wget(1).
Copy link
Member

@ncw ncw left a 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?

@KAction
Copy link
Author

KAction commented Jun 10, 2021

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.

@KAction
Copy link
Author

KAction commented Jun 10, 2021

Maybe it worth adding warning that URL generated may not work in all applications, e.g

logging.warning("backend service actively fighting direct links, so this link may break any time. See #5398")

@KAction
Copy link
Author

KAction commented Sep 19, 2021

@ncw So, what is your take on this?

@ncw
Copy link
Member

ncw commented Sep 20, 2021

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!

@KAction
Copy link
Author

KAction commented Sep 20, 2021

I am happy as much as I can be with such non-accommodating provider.

@ivandeex
Copy link
Member

okay, it's blessed, let's merge this :)

@ivandeex ivandeex merged commit bb11803 into rclone:master Oct 23, 2021
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants