[PR #2865] [CLOSED] [PM-4794] Trim TOTP key #52067

Closed
opened 2026-05-01 15:50:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2865
Author: @flooxo
Created: 11/11/2023
Status: Closed

Base: mainHead: master


📝 Commits (10+)

  • a81dfc2 Patch/update ios provision profiles (#2398)
  • 3f86bb0 PM-1271 Removed StorageMediatorOptions and go to a plain parameters based approach (#2397)
  • 7413962 Autosync the updated translations (#2399)
  • c02cd1f [PM-1249] Clear/reset password/PIN fields on login/lock screen when app is backgrounded (#2395)
  • 4d2b53c Use encoded query parameters over path (#2354)
  • a18f74a [PM-1129] iOS 16 Third-Party 2FA OTP handling (#2409)
  • 9f8307a [EC-770] Implement MessagePack on Watch sync (#2264)
  • f733d22 PM-1386 Fix otp data issuer and account name being set correctly (#2411)
  • fe12b0e Autosync the updated translations (#2412)
  • ad9ca12 [PS-2486] Finally stop filling password into username field (#2367)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

This PR resolves #2122.
When cloning a working entry that has a valid OTP and editing the cloned entry by putting a space at the beginning of otpauth:// a wrong OTP is generated.

Code changes

  • TotpService.cs: The expected behaviour would be to still have a valid otp and therefore the whitespaces are trimmed.
    Thanks to @FlorianLang06

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2865 **Author:** [@flooxo](https://github.com/flooxo) **Created:** 11/11/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `master` --- ### 📝 Commits (10+) - [`a81dfc2`](https://github.com/bitwarden/android/commit/a81dfc271c893c7ea27515c9c5148affafb13e1d) Patch/update ios provision profiles (#2398) - [`3f86bb0`](https://github.com/bitwarden/android/commit/3f86bb0cd7e33c29e7374c0caee402b9fd30386e) PM-1271 Removed StorageMediatorOptions and go to a plain parameters based approach (#2397) - [`7413962`](https://github.com/bitwarden/android/commit/74139627e2735f62bae1e69fb661d59ad5541cbd) Autosync the updated translations (#2399) - [`c02cd1f`](https://github.com/bitwarden/android/commit/c02cd1f15bd02dd9b79eccf0d0cec10f31558f56) [PM-1249] Clear/reset password/PIN fields on login/lock screen when app is backgrounded (#2395) - [`4d2b53c`](https://github.com/bitwarden/android/commit/4d2b53c80945277605c298119ee7ad2c13b73d4c) Use encoded query parameters over path (#2354) - [`a18f74a`](https://github.com/bitwarden/android/commit/a18f74a72adc1821697887dee58dd729aad62c0e) [PM-1129] iOS 16 Third-Party 2FA OTP handling (#2409) - [`9f8307a`](https://github.com/bitwarden/android/commit/9f8307a4fff14e2360f54f7d758a8b81430e482a) [EC-770] Implement MessagePack on Watch sync (#2264) - [`f733d22`](https://github.com/bitwarden/android/commit/f733d22d55d25ad56a79f0db954a964b98a9ac6f) PM-1386 Fix otp data issuer and account name being set correctly (#2411) - [`fe12b0e`](https://github.com/bitwarden/android/commit/fe12b0e908e0868762940271d382d771eba5f52c) Autosync the updated translations (#2412) - [`ad9ca12`](https://github.com/bitwarden/android/commit/ad9ca125a09447470255eaa860e8eaa0908d2000) [PS-2486] Finally stop filling password into username field (#2367) ### 📄 Description ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> This PR resolves #2122. When cloning a working entry that has a valid OTP and editing the cloned entry by putting a space at the beginning of otpauth:// a wrong OTP is generated. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **TotpService.cs:** The expected behaviour would be to still have a valid otp and therefore the whitespaces are trimmed. Thanks to @FlorianLang06 ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-01 15:50:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#52067