Skip to content

Commit

Permalink
fix: remove colon from QR label #6537 (#6549)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomer2001 committed Nov 10, 2023
1 parent 64d8966 commit 22355b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public String generateSecretKeyUri(byte[] secretKey, String displayName) {
String secretKeyBase32 = BaseEncoding.base32().omitPadding().encode(secretKey);
OTPKey otpKey = new OTPKey(secretKeyBase32, OTPType.HOTP);

OTPAuthURIBuilder uribe = OTPAuthURIBuilder.fromKey(otpKey).label(displayName);
OTPAuthURIBuilder uribe = OTPAuthURIBuilder.fromKey(otpKey).label(displayName.replace(':', ' '));
uribe = uribe.issuer(issuer).digits(conf.getDigits());

logger.trace("Generating secret key URI");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public String generateSecretKeyUri(byte[] secretKey, String displayName) {
String secretKeyBase32 = BaseEncoding.base32().omitPadding().encode(secretKey);
OTPKey otpKey = new OTPKey(secretKeyBase32, OTPType.TOTP);

OTPAuthURIBuilder uribe = OTPAuthURIBuilder.fromKey(otpKey).label(displayName);
OTPAuthURIBuilder uribe = OTPAuthURIBuilder.fromKey(otpKey).label(displayName.replace(':', ' '));
uribe = uribe.issuer(issuer).digits(conf.getDigits());
uribe = uribe.timeStep(TimeUnit.SECONDS.toMillis(conf.getTimeStep()));

Expand Down

0 comments on commit 22355b6

Please sign in to comment.