You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "daviftorres (via GitHub)" <gi...@apache.org> on 2026/07/22 16:05:18 UTC

[PR] Change 2FA Field Type From Password to Text [cloudstack]

daviftorres opened a new pull request, #13671:
URL: https://github.com/apache/cloudstack/pull/13671

   ### Description
   
   This PR suggest changes to https://github.com/apache/cloudstack/issues/13337.
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [X] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [X] Trivial
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   **Note:** I am not a developer, so please do the appropriated tests to validate what I propose. It is at the best of my intentions and limited by my competences.
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "daviftorres (via GitHub)" <gi...@apache.org>.
daviftorres commented on PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#issuecomment-5106601035

   > @daviftorres you opened the same change to 4.20, 4.22 and main. We usually merge on the oldest branch and then merge forwards. In this way the fix has the some commit-id on all branches and it will be easier to track where a fix sits. Any merge conflict will have to be addressed, which you now did in advance. Thanks for that ;) but let’s stick to the 4.20 one and use the others only as documentation for conflict resolution.
   
   hey @DaanHoogland , my limited git stills felt whort on me. Feel free to close and make any changes you deem apropriated. Tks for letting me know. Next time I ask for help first. Regards,


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#issuecomment-5094094545

   @daviftorres you opened the same change to 4.20, 4.22 and main. We usually merge on the oldest branch and then merge forwards. In this way the fix has the some commit-id on all branches and it will be easier to track where a fix sits. Any merge conflict will have to be addressed, which you now did in advance. Thanks for that ;) but let’s stick to the 4.20 one and use the others only as documentation for conflict resolution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "daviftorres (via GitHub)" <gi...@apache.org>.
daviftorres commented on code in PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#discussion_r3633684504


##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   Suggest a fix to put the input field in focus based on its new attributes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#issuecomment-5068449955

   @daviftorres code looks good to me, it seems to be applicable to earlier versions as well, so if interested you could rebase it on older LTS branches (4.20 or 4.22).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#discussion_r3631863311


##########
ui/src/views/iam/SetupTwoFaAtUserProfile.vue:
##########
@@ -100,7 +100,7 @@
           <a-row :gutter="12">
             <a-col :md="24" :lg="20">
               <a-form-item @finish="submitPin" v-ctrl-enter="submitPin" name="code" ref="code">
-                <a-input-password
+                <a-input
                   v-model:value="form.code"
                   placeholder="xxxxxx" />

Review Comment:
   To reduce password-manager autofill/save issues and follow HTML conventions for OTP fields, the 2FA input should include `autocomplete="one-time-code"` (and ideally a numeric input hint).



##########
ui/src/views/dashboard/SetupTwoFaAtLogin.vue:
##########
@@ -109,7 +109,7 @@
           <a-row :gutter="24">
             <a-col :md="24" :lg="22">
               <a-form-item @finish="submitPin" v-ctrl-enter="submitPin" name="code" ref="code">
-                <a-input-password
+                <a-input
                   v-model:value="form.code"
                   placeholder="xxxxxx" />

Review Comment:
   To reduce password-manager autofill/save issues and follow HTML conventions for OTP fields, the 2FA input should include `autocomplete="one-time-code"` (and ideally a numeric input hint).



##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   To reduce password-manager autofill/save issues and follow HTML conventions for OTP fields, the 2FA input should include `autocomplete="one-time-code"` (and ideally a numeric input hint).



##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   After switching the 2FA code field to <a-input>, focusInput() still searches for `input[type=password]` (see VerifyTwoFa.vue:86), so the 2FA input will no longer be auto-focused on mount.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "daviftorres (via GitHub)" <gi...@apache.org>.
daviftorres commented on code in PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#discussion_r3633734778


##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   Nevermind



##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   Suggest a fix to put the input field in focus based on its new attributes.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#issuecomment-5068542769

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13671?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 3.41%. Comparing base ([`e1cf0f3`](https://app.codecov.io/gh/apache/cloudstack/commit/e1cf0f335a7f2e4b6cd71c3147ef64bcd89d486e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b828ca0`](https://app.codecov.io/gh/apache/cloudstack/commit/b828ca01dcab3a597277a63a64e0f2958afbaa5a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   > :exclamation:  There is a different number of reports uploaded between BASE (e1cf0f3) and HEAD (b828ca0). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (e1cf0f3) | HEAD (b828ca0) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               main   #13671       +/-   ##
   =============================================
   - Coverage     19.64%    3.41%   -16.24%     
   =============================================
     Files          6368      487     -5881     
     Lines        575119    41867   -533252     
     Branches      70382     7912    -62470     
   =============================================
   - Hits         112994     1429   -111565     
   + Misses       449839    40238   -409601     
   + Partials      12286      200    -12086     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13671/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/13671/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.41% <ø> (ø)` | |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13671/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cloudstack/pull/13671?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "daviftorres (via GitHub)" <gi...@apache.org>.
daviftorres commented on code in PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#discussion_r3633741191


##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   Done! Tks for the heads up.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#issuecomment-5114455568

   closing in favour of #13723


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #13671: Change 2FA Field Type From Password to Text
URL: https://github.com/apache/cloudstack/pull/13671


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Change 2FA Field Type From Password to Text [cloudstack]

Posted by "daviftorres (via GitHub)" <gi...@apache.org>.
daviftorres commented on code in PR #13671:
URL: https://github.com/apache/cloudstack/pull/13671#discussion_r3633734778


##########
ui/src/views/dashboard/VerifyTwoFa.vue:
##########
@@ -33,7 +33,7 @@
       @finish="handleSubmit"
       layout="vertical">
       <a-form-item name="code" ref="code" style="text-align: center;">
-        <a-input-password
+        <a-input
           style="width: 500px"
           v-model:value="form.code"
           placeholder="xxxxxx" />

Review Comment:
   Nevermind



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org