forked from github/dataease
Merge pull request #8609 from dataease/pr@dev-v2@fileddesc
fix: DataEase 未授权漏洞
This commit is contained in:
commit
5e80af5fc9
@ -1,6 +1,7 @@
|
||||
package io.dataease.utils;
|
||||
|
||||
import io.dataease.constant.AuthConstant;
|
||||
import io.dataease.exception.DEException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
@ -44,6 +45,9 @@ public class WhitelistUtils {
|
||||
"/");
|
||||
|
||||
public static boolean match(String requestURI) {
|
||||
if (requestURI.contains(";") && !requestURI.contains("?")) {
|
||||
DEException.throwException("Invalid uri: " + requestURI);
|
||||
}
|
||||
if (StringUtils.startsWith(requestURI, getContextPath())) {
|
||||
requestURI = requestURI.replaceFirst(getContextPath(), "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user