From 4ffc29d45ff1121f76b39ac7acaee824b4d04aaf Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Wed, 22 Mar 2017 16:39:21 +0100 Subject: [PATCH] WebUI: check principals in lowercase WebUI checks whether principal name of logged user and principal name in each command is equal. As KDC for our principals is case insensitive - it does make sense to switch this check also into case insensitive. So both principals are reformated to lower case and then compared. Part of: https://pagure.io/freeipa/issue/3242 Reviewed-By: Petr Vobornik Reviewed-By: Alexander Bokovoy --- install/ui/src/freeipa/rpc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/ui/src/freeipa/rpc.js b/install/ui/src/freeipa/rpc.js index 7ae1b64291a4530137e0fb8d72ff5a8491cb10b4..1880f8d5732f982c25924b787b273c9e56636b20 100644 --- a/install/ui/src/freeipa/rpc.js +++ b/install/ui/src/freeipa/rpc.js @@ -389,7 +389,8 @@ rpc.command = function(spec) { } else if (IPA.version && data.version && IPA.version !== data.version) { window.location.reload(); - } else if (IPA.principal && data.principal && IPA.principal !== data.principal) { + } else if (IPA.principal && data.principal && + IPA.principal.toLowerCase() !== data.principal.toLowerCase()) { window.location.reload(); } else if (data.error) { -- 2.12.1