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