mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
Merge pull request #8609 from dataease/pr@dev-v2@fileddesc
fix: DataEase 未授权漏洞
This commit is contained in:
@@ -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(), "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user