From 1dcdcd12f4336c98e7507fe0e7f0c0da2bc69eba Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Mar 27 2017 06:55:41 +0000 Subject: 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 --- diff --git a/install/ui/src/freeipa/rpc.js b/install/ui/src/freeipa/rpc.js index 7ae1b64..1880f8d 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) {