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

In testing, use the Example domains. #114

Merged
merged 1 commit into from
Dec 27, 2021

Conversation

madogiwa0124
Copy link
Contributor

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
Copy link
Owner

mikker commented Dec 25, 2021

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

@mikker mikker self-requested a review December 25, 2021 21:45
@madogiwa0124
Copy link
Contributor Author

@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.

def passwordless_query_redirect_path
query_redirect_uri = URI(params[:destination_path])
query_redirect_uri.to_s if query_redirect_uri.host.nil? || query_redirect_uri.host == URI(request.url).host
rescue URI::InvalidURIError, ArgumentError
nil
end

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
Copy link
Owner

mikker commented Dec 27, 2021

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

@mikker mikker merged commit 652de97 into mikker:master Dec 27, 2021
@mikker
Copy link
Owner

mikker commented Dec 27, 2021

Thanks! 💙💚💛💜❤️

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

Successfully merging this pull request may close these issues.

None yet

2 participants