From b26c37eba6459e74174bb4571513f437142359e9 Mon Sep 17 00:00:00 2001 From: Virtually Nick Date: Fri, 18 Oct 2024 07:29:10 -0400 Subject: [PATCH] GUACAMOLE-1239: Update case-sensitivity logic for AbstractIdentifiable --- .../apache/guacamole/net/auth/AbstractIdentifiable.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractIdentifiable.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractIdentifiable.java index f0cd2ed1a..c7b8a950c 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractIdentifiable.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/AbstractIdentifiable.java @@ -73,11 +73,12 @@ public abstract class AbstractIdentifiable implements Identifiable { if (otherIdentifier == null) return identifier == null; - // If this identifier is case-sensitive, evaluate with case-sensitivity. - if (isCaseSensitive()) + // If either this identifier or the one we're comparing to is + // case-sensitive, evaluate with case-sensitivity. + if (isCaseSensitive() || ((AbstractIdentifiable) other).isCaseSensitive()) return otherIdentifier.equals(identifier); - // The identifier should not be evaluated in a case-sensitive manner. + // Both identifiers can be evaluated in a case-insensitive manner. return otherIdentifier.equalsIgnoreCase(identifier); }