forked from plusone/plusone-commons
perf: 限制 PagingAndSortingQueryParams 中用于排序的字段名称的长度,允许包含短横(-)。
This commit is contained in:
parent
615837ac27
commit
d34634a18b
@ -50,7 +50,7 @@ public class PagingAndSortingQueryParams {
|
||||
private Long pageNum;
|
||||
private List<String> orderBy;
|
||||
|
||||
private static final Pattern SORT_STR_PATTERN = Pattern.compile("^[a-zA-Z]\\w+-(desc|asc|DESC|ASC)$");
|
||||
private static final Pattern SORT_STR_PATTERN = Pattern.compile("^[a-zA-Z][\\w-]{0,63}-(desc|asc|DESC|ASC)$");
|
||||
|
||||
private final Map<String, String> sortableProperties;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user