[4.0] Removed required state for Secret Key field #17713
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
System Information
Steps to reproduce the issue
With Two Factor Authentication (afterwards called TFA) enabled, try to log in to
<yourinstallpath>/administrator
with a user which has no TFA enabled.For more information, see __ > Testing instructions__.
Summary of Changes
I removed the required class from the input field. There is a JS running which checks for this class and then adds the
required aria-required="true"
which isn't needed for the Secret Key field.Testing instructions
<yourinstallpath/administrator
If you have any other ideas to test this, please think outside the box!
Expected result
Checking if a user has TFA enabled in PHP is laborious (would be more of a JS thing). Therefore, it is okay to display the Secret Key field, but ignore it for users with no TFA enabled.
For users with not TFA enabled for them, it should look like this and login needs to be possible:
Actual result
At the moment, login with non-TFA-users in administrator is not possible. The Secret Key field is always required.
Summary of Changes
I removed the required class from the input field. There is a JS running which checks for this class and then adds the
required aria-required="true"
which isn't needed for the Secret Key field.Additional comments
This is a bugfix according to the bug I found in #17687
This fix is compatible with the changes made in #17687
Documentation Changes Required
The template file (default.php) isn't really documented so there are no changes needed.
Developed @icampus