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

Add https:// to front of domain argument if it's not a URL #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jikamens
Copy link

@jikamens jikamens commented Sep 8, 2023

The "domain" argument to the 2FAS API isn't actually expecting a domain, it's expecting a URL (see
twofas/2fas-server#6).

Arguably it would be better to rename the "--domain" argument in this script to "--url" for clarity, but absent that, at the very least we should check if the user specifies a domain instead of a URL—since that's what the parameter is called, it's an easy mistake to make!—and if so, then add "https://" to the beginning of it so that we're passing the 2FAS server something it expects.

Fixes #1.

The "domain" argument to the 2FAS API isn't actually expecting a
domain, it's expecting a URL (see
twofas/2fas-server#6).

Arguably it would be better to rename the "--domain" argument in this
script to "--url" for clarity, but absent that, at the very least we
should check if the user specifies a domain instead of a URL—since
that's what the parameter is called, it's an easy mistake to make!—and
if so, then add "https://" to the beginning of it so that we're
passing the 2FAS server something it expects.

Fixes dspitzer#1.
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.

Domain / identifier not correctly identified in 2FAS app
1 participant