Skip to content

Commit 04fe313

Browse files
committed
SecurityProviderRegistrar: binary search needs a sorted array
Somehow I suspect nobody is actually using these configuration possibilities, otherwise someone surely would have tripped over this.
1 parent 526432a commit 04fe313

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sshd-common/src/main/java/org/apache/sshd/common/util/security/SecurityProviderRegistrar.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,12 @@ static boolean isSecurityEntitySupported(
274274
return false;
275275
}
276276

277-
if ((values.length == 1) && isAllOptionsValue(values[0])) {
278-
return true;
277+
if (values.length == 1) {
278+
if (isAllOptionsValue(values[0])) {
279+
return true;
280+
}
281+
} else {
282+
Arrays.sort(values, String.CASE_INSENSITIVE_ORDER);
279283
}
280284

281285
String effectiveName = getEffectiveSecurityEntityName(entityType, name);

0 commit comments

Comments
 (0)