Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add https:// to front of domain argument if it's not a URL
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.
- Loading branch information