File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
spring-context/src/main/java/org/springframework/validation Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 23
23
import java .util .Collections ;
24
24
import java .util .HashMap ;
25
25
import java .util .List ;
26
+ import java .util .Locale ;
26
27
import java .util .Map ;
27
28
28
29
import org .apache .commons .logging .Log ;
@@ -482,7 +483,8 @@ public void setDisallowedFields(@Nullable String... disallowedFields) {
482
483
else {
483
484
String [] fieldPatterns = new String [disallowedFields .length ];
484
485
for (int i = 0 ; i < fieldPatterns .length ; i ++) {
485
- fieldPatterns [i ] = PropertyAccessorUtils .canonicalPropertyName (disallowedFields [i ]).toLowerCase ();
486
+ String field = PropertyAccessorUtils .canonicalPropertyName (disallowedFields [i ]);
487
+ fieldPatterns [i ] = field .toLowerCase (Locale .ROOT );
486
488
}
487
489
this .disallowedFields = fieldPatterns ;
488
490
}
@@ -825,7 +827,7 @@ protected boolean isAllowed(String field) {
825
827
String [] allowed = getAllowedFields ();
826
828
String [] disallowed = getDisallowedFields ();
827
829
return ((ObjectUtils .isEmpty (allowed ) || PatternMatchUtils .simpleMatch (allowed , field )) &&
828
- (ObjectUtils .isEmpty (disallowed ) || !PatternMatchUtils .simpleMatch (disallowed , field .toLowerCase ())));
830
+ (ObjectUtils .isEmpty (disallowed ) || !PatternMatchUtils .simpleMatch (disallowed , field .toLowerCase (Locale . ROOT ))));
829
831
}
830
832
831
833
/**
You can’t perform that action at this time.
0 commit comments