Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-4794] Trim TOTP key #2865

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[PM-4794] Trim TOTP key #2865

wants to merge 2 commits into from

Conversation

flooxo
Copy link

@flooxo flooxo commented Nov 11, 2023

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

Signed-off-by: Florian Grabmeier <[email protected]>
@bitwarden-bot
Copy link

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

@bitwarden-bot bitwarden-bot changed the title Trim TOTP key [PM-4794] Trim TOTP key Nov 11, 2023
@bitwarden-bot
Copy link

bitwarden-bot commented Nov 11, 2023

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

No New Or Fixed Issues Found

@flooxo flooxo requested a review from a team as a code owner January 29, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

using a space at the beginning of otpauth:// generate a wrong OTP
2 participants