RTC bug Maintainers Checked PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar sitecode
sitecode
4 Jan 2024
  • Fix code input pattern attribute

  • Specify autocomplete on code input

Pull Request for Issue # .

Summary of Changes

Fix JS pattern attribute error for code input element: Pattern attribute value {0,9} is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /{0,9}/v: Nothing to repeat

Prevent auto completion of code input element. Can cause trouble for certain users, when the browser tries to autofill past values as they enter in the current code.

I intend this fix to also apply to Joomla 5. I assume that this pull request will magically apply there as well. Otherwise please instruct me how to pull that off assuming this moves forward.

Testing Instructions

In Chrome go to setup MFA, start typing code in code input element and JS pattern error appears in console.

Actual result BEFORE applying this Pull Request

  • JS error.
  • Autocomplete entries show from past codes entered.

Expected result AFTER applying this Pull Request

  • JS error resolved, doesn't show. And form submission not allowed until 6 numbers entered.
  • Code input element doesn't remember past entries.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar sitecode sitecode - open - 4 Jan 2024
avatar sitecode sitecode - change - 4 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jan 2024
Category Front End Plugins
avatar sitecode sitecode - change - 4 Jan 2024
Labels Added: PR-4.4-dev
avatar sitecode sitecode - change - 4 Jan 2024
The description was changed
avatar sitecode sitecode - edited - 4 Jan 2024
avatar sitecode sitecode - change - 4 Jan 2024
The description was changed
avatar sitecode sitecode - edited - 4 Jan 2024
avatar dautrich
dautrich - comment - 13 Jan 2024

I'm not quite happy with this PR for the following reasons:

  • After application of the patch, the behavior differs between Chromium-base browsers (Chrome, Edge, Vivaldi) and Firefox: If you enter a string in the wrong format, Chromium-based browsers don't throw a javascript error, but Firefox does so.
  • The "Validate" button should be greyed out until a string in correct format is entered.

But as the description only deals with Chrome, the PR does what it is supposed to do. Therefore, I will post a positive test result.

avatar dautrich dautrich - test_item - 13 Jan 2024 - Tested successfully
avatar dautrich
dautrich - comment - 13 Jan 2024

I have tested this item ✅ successfully on e0bdbfb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42608.

avatar sitecode sitecode - change - 15 Jan 2024
Labels Added: bug Maintainers Checked
avatar Quy Quy - test_item - 17 Jan 2024 - Tested successfully
avatar Quy
Quy - comment - 17 Jan 2024

I have tested this item ✅ successfully on 2d7346b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42608.

avatar Quy Quy - alter_testresult - 17 Jan 2024 - dautrich : Tested successfully
avatar Quy Quy - change - 17 Jan 2024
Status Pending Ready to Commit
avatar Quy
Quy - comment - 17 Jan 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42608.

avatar Quy Quy - change - 18 Jan 2024
Labels Added: RTC
avatar laoneo laoneo - change - 19 Jan 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-01-19 14:44:09
Closed_By laoneo
avatar laoneo laoneo - close - 19 Jan 2024
avatar laoneo laoneo - merge - 19 Jan 2024
avatar laoneo
laoneo - comment - 19 Jan 2024

Thanks!

avatar brianteeman
brianteeman - comment - 23 Jan 2024

Is this correct. Seems to me that there are two conflicting settings

autocomplete = one-time-code
aria-autocomplete = none

The first defines the type of data a browser can use to autocomplete the field but the second one turns off the ability to autocomplete the input

Add a Comment

Login with GitHub to post a comment