mikker / passwordless

🗝 Authentication for your Rails app without the icky-ness of passwords
MIT License
1.26k stars 87 forks source link

In testing, use the Example domains. #114

Closed madogiwa0124 closed 2 years ago

madogiwa0124 commented 2 years ago

There was a part in the test code where the Example domains was not used, so it has been fixed.

Example domains As described in RFC 2606 and RFC 6761, a number of domains such as example.com and example.org are maintained for documentation purposes. These domains may be used as illustrative examples in documents without prior coordination with us. They are not available for registration or transfer. https://www.iana.org/domains/reserved

How about PR?

mikker commented 2 years ago

Thanks! Is there a reason we use the insecure. version and not just https://...?

madogiwa0124 commented 2 years ago

@mikker

Thanks for comment!

Is there a reason we use the insecure. version

This is an insecure redirect destination, we added insecure. for clarity.

not just https://...

This is because the original implementation was http, so I followed it.

I understand that this test verifies that redirects to another host are properly rejected.

https://github.com/mikker/passwordless/blob/43479f4ea9b80cf646e4f2f8ec0a2cfcaaeda134/app/controllers/passwordless/sessions_controller.rb#L74-L79

As you said, even if don't add a subdomain, it will validate fine because it uses example.org which is different from the default www.example.com 👍🏻

Would https://example.org/secret-alt or something else be more obvious?

If so, I will try to fix it that way 😃

mikker commented 2 years ago

This is fine 👍 I was just curious if it was a conscious choice or not.

mikker commented 2 years ago

Thanks! 💙💚💛💜❤️