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

Automatically add https scheme to fully qualify origin #385

Closed
Regenhardt opened this issue Mar 9, 2023 · 4 comments
Closed

Automatically add https scheme to fully qualify origin #385

Regenhardt opened this issue Mar 9, 2023 · 4 comments

Comments

@Regenhardt
Copy link
Contributor

The function ToFullyQualifiedOrigin removes any route beyond the authority (host+port), but doesn't add a scheme if there isn't one in the input string. Not sure about how full qualification is defined exactly, but it doesn't feel fully qualified if it doesn't have the scheme, which the FullyQualifiedOrigins property that uses this function expects to have set.

This leads to this being obligatory:

    options.ServerDomain = origin;
    options.Origins = new HashSet<string> { $"https://{origin}" };

Can we add ?? "https:// in there to make sure there is something there if it isn't present in the input?
Going with https here since this is the general default.

@aseigler
Copy link
Collaborator

aseigler commented Mar 9, 2023

I think that will break Android apps if I remember correctly.

@Regenhardt
Copy link
Contributor Author

Do you know of an open source android app I could look at? I'd like to know how the whole RpId thing works in android, since the app doesn't have an origin the server could match the RpId to.

@aseigler
Copy link
Collaborator

aseigler commented Mar 9, 2023

Not off the top of my head (possibly Bitwarden?), but this came up in #237.

@Regenhardt
Copy link
Contributor Author

OK I see, never mind then, thanks for checking.

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

No branches or pull requests

2 participants