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

Change default of secure_image_url to true, because downloading image via http results in 500 error #345

Closed
swiknaba opened this issue Oct 20, 2020 · 2 comments · Fixed by #346

Comments

@swiknaba
Copy link
Contributor

When trying to download the profile image via

require 'open-uri'

io = open(request.env['omniauth.auth'].info.image)

Facebook responds with a 500 error. Switching protocol from http to https solves the problem.

Looking into the Facebook docs: https://developers.facebook.com/docs/facebook-login/security#surfacearea
we see that starting from the 6th of October 2018, using HTTPS is mandatory:

Use HTTPS

Use HTTPS, instead of HTTP, as an internet protocol, because it uses encryption. HTTPS keeps transmitted data private and guards against eavesdropping attacks. It also prevents data from being tampered with during transmission by, for example, introducing advertisements or malicious code.

On October 6, 2018, all apps will be required to use HTTPS.

hence I propose to switch the default of secure_image_url from false to true.

I can open a PR if you agree with the change.

@simi
Copy link
Owner

simi commented Oct 20, 2020

yes, feel free to do

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants