mobile icon indicating copy to clipboard operation
mobile copied to clipboard

[PM-4794] Trim TOTP key

Open flooxo opened this issue 1 year ago • 2 comments

Type of change

  • [x] 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

flooxo avatar Nov 11 '23 11:11 flooxo

Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PM-4794

bitwarden-bot avatar Nov 11 '23 11:11 bitwarden-bot

Logo Checkmarx One – Scan Summary & Details78145036-f3c2-49a7-ad60-703aa5bdcbf2

No New Or Fixed Issues Found

bitwarden-bot avatar Nov 11 '23 11:11 bitwarden-bot

Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PM-4794

Logo Checkmarx One – Scan Summary & Details78145036-f3c2-49a7-ad60-703aa5bdcbf2

No New Or Fixed Issues Found