Nothing Special   »   [go: up one dir, main page]

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 secure redirect check on entered URL for validate-rel-me? #91

Open
gRegorLove opened this issue Sep 8, 2020 · 0 comments
Open

Comments

@gRegorLove
Copy link
Member

I'm working on upgrading indiewebify.me to run on Symfony (#82). I found some code that does not appear to run correctly on the live site. I'm not sure why, but investigating it on the development site, I'm not sure it's needed anyway.

In the validate-rel-me step, the entered URL is normalized, fetched, and any redirects are followed, using indieweb/rel-me relMeDocumentUrl(). That function returns the final URL, a boolean of whether the redirect chain was secure, and an array of the redirect chain URLs.

Then this if condition is supposed to show an error if the redirect chain was insecure. This is all before the final profile URL is parsed for rel-me values.

That if condition works on the Symfony site but does not appear to work on the live site. My site redirects http -> https, so if I enter http://gregorlove.com/, the error message shows and no rel-me URLs are parsed. This seems like a bad user experience. I can't think of a good reason to show an error like that but wanted to check if I'm forgetting something.

I think we only want to report scheme differences if the link back from a rel-me uses a different scheme, like:

<!-- on https://example.com/ -->
<a href="https://github.com/example" rel="me">github</a>
<!-- on https://github.com/example -->
<a href="http://example.com/" rel="me">example.com</a>

The live site will show "link back is to http:// not https://" next to that rel-me link.

Is it safe to remove that if condition in the Symfony site I'm working on?

@gRegorLove gRegorLove changed the title Remove the secure redirect check entered URL for validate-rel-me? Remove secure redirect check on entered URL for validate-rel-me? Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant