mike-jumper commented on a change in pull request #495: GUACAMOLE-770: Support
for clearing TOTP data
URL: https://github.com/apache/guacamole-client/pull/495#discussion_r403407572
##########
File path:
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java
##########
@@ -108,7 +108,7 @@ private UserTOTPKey getKey(UserContext context,
// If no key is defined, attempt to generate a new key
String secret =
attributes.get(TOTPUser.TOTP_KEY_SECRET_ATTRIBUTE_NAME);
- if (secret == null) {
+ if (secret == null || secret.isEmpty()) {
Review comment:
Why expand the representation of no defined key to include the empty string?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services