-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Improve TOTP field #2795
Improve TOTP field #2795
Conversation
Signed-off-by: DL6ER <[email protected]>
… the password field as well Signed-off-by: DL6ER <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very good solution, if you have this already at hand ;-) Feel free to push ti this branch |
I will do it in a few minutes. |
using input-group and input-group-btn classes. Also remove the key icon from the password field. Signed-off-by: RD WebDesign <[email protected]>
2fb41f2
to
abf7074
Compare
Signed-off-by: RD WebDesign <[email protected]>
Signed-off-by: RD WebDesign <[email protected]>
abf7074
to
f56102a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no distinction between entering a wrong password or a wrong TOTP. It will always complain about "Wrong password" and autofocus on the password field - even when the TOTP was wrong.
Signed-off-by: RD WebDesign <[email protected]>
b14e7f5
to
74c10d3
Compare
I am not able to reproduce this and looking again at the Javascript code, it also isn't immediately obvious to me how this could be happening. Could you try again and screenshot the Please make sure to have "Persist Logs" enabled for them to "survive" the login process.
I will change this to be clearer. |
Signed-off-by: DL6ER <[email protected]>
If you think letting users know if they entered a wrong password or a wrong TOTP is a security issue, I'm fine with leaving it as it is. I know this discussion, but it feels a bit like "security by obfuscation". If the second factor is so weak that it can be brute-forced within 30 seconds (before a new TOTP is generated), the second factor is broken anyway. |
Yeah, since online-bruteforcing is prevented by FTL and when they can get physical/ |
Signed-off-by: Christian König <[email protected]>
The issue observed was triggered by |
Is there a reason we prevent a TOTP re-use within 30 seconds?
This seems to be a too long lock interval. |
It is a Time-Based One-Time Password Algorithm :-) FTL has the answer to this question here:
furthermore:
and sections 5.3:
https://github.com/pi-hole/FTL/blob/afb6f865187099557aa6bb3332286ca2bf6730e7/src/api/2fa.c#L223-L224 The point is: Someone can somehow see your keystrokes. You enter your password. You enter your TOTP code. They immediately try to use them to log in and they'd succeed. The motivation behind the last point is that, even though they're still within the 30 second window for that code, it shouldn't work for they - specifically because you already used it. |
Signed-off-by: DL6ER <[email protected]>
With the most recent changes, the login page can much better react on errors: Initial stateNo password is supplied, submission is preventedWrong password is enteredRate-limitedWrong 2FA token is providedNumber of API seats is exceeded(set For rate-limiting and API seat exhaustion to be reported correctly, you have to use FTL from pi-hole/FTL#1733 (branch |
Signed-off-by: DL6ER <[email protected]>
I noticed this wasn't reviewed after your last 2 commits. I tested and it looks fine, but I'm requesting yubiuser approval, because you 2 were discussing about error/warning messages. |
With the LastPass extension, the brave_Ey6VtymkArH8.mp4 |
Maybe it's worth informing them about it? |
Sure, go ahead. You can link the issue/analysis here so they know what you are referring to. |
What does this implement/fix?
Fix misaligned TOTP field icon, make password field larger when TOTP is enabled and fix auto-submission to only fire when the user has already put in something into the password field.
Screenshots
TOTP not enabled, before and after
TOTP enabled,
development-v6
(misaligned icon, small password field)
TOTP enabled, this PR
Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.