From 4e8c9e1cb7fb6f86d1753a32936091ad09cf39ac Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 17 Feb 2019 20:54:40 -0800 Subject: [PATCH] GUACAMOLE-708: Remove requirement for users to have UPDATE permission on themselves for TOTP to work. --- .../guacamole/auth/totp/user/UserVerificationService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java b/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java index a73d08f96..e0cd84b3d 100644 --- a/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java +++ b/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java @@ -181,12 +181,13 @@ public class UserVerificationService { // Update user object try { - context.getUserDirectory().update(self); + context.getPrivileged().getUserDirectory().update(self); } catch (GuacamoleSecurityException e) { logger.info("User \"{}\" cannot store their TOTP key as they " - + "lack permission to update their own account. TOTP " - + "will be disabled for this user.", + + "lack permission to update their own account and the " + + "TOTP extension was unable to obtain privileged access. " + + "TOTP will be disabled for this user.", self.getIdentifier()); logger.debug("Permission denied to set TOTP key of user " + "account.", e);