alexandru-bagu commented on a change in pull request #584:
URL: https://github.com/apache/guacamole-client/pull/584#discussion_r575667460
##########
File path:
extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java
##########
@@ -166,7 +166,7 @@ private boolean setKey(UserContext context, UserTOTPKey key)
// Get mutable set of attributes
User self = context.self();
- Map<String, String> attributes = new HashMap<String, String>();
+ Map<String, String> attributes = new HashMap<>(self.getAttributes());
Review comment:
The issue lies in
https://github.com/apache/guacamole-client/blob/9ad5d4801c2ce9510afdbd347067edcab86cafbc/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java#L512
Perhaps
https://github.com/apache/guacamole-client/blob/9ad5d4801c2ce9510afdbd347067edcab86cafbc/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java#L518
should be
`setUnrestrictedAttributes(self.getAttributes());`
since we have already merged the old attributes with the new ones.
Likewise for
https://github.com/apache/guacamole-client/blob/9ad5d4801c2ce9510afdbd347067edcab86cafbc/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java#L522
----------------------------------------------------------------
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]