mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-07 23:28:24 +08:00
@@ -64,11 +64,13 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkLogin(HttpServletRequest request, HttpServletResponse response) {
|
public boolean checkLogin(HttpServletRequest request, HttpServletResponse response) {
|
||||||
String uri = request.getRequestURI().replace("//", "/");
|
String uri = request.getRequestURI();
|
||||||
if (uri.contains("/../") || uri.contains("/./")) {
|
if (uri.contains("./") || uri.contains("///")) {
|
||||||
LOGGER.error("class=LoginServiceImpl||method=checkLogin||msg=uri illegal, contains /../ or /./||uri={}", uri);
|
LOGGER.error("class=LoginServiceImpl||method=checkLogin||msg=uri illegal, contains ../ or ./ or ///||uri={}", uri);
|
||||||
|
singleSignOn.setRedirectToLoginPage(response);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
uri = uri.replaceAll("//", "/");
|
||||||
|
|
||||||
if (uri.startsWith(ApiPrefix.API_V1_SSO_PREFIX)
|
if (uri.startsWith(ApiPrefix.API_V1_SSO_PREFIX)
|
||||||
|| uri.startsWith(ApiPrefix.API_V1_THIRD_PART_PREFIX)
|
|| uri.startsWith(ApiPrefix.API_V1_THIRD_PART_PREFIX)
|
||||||
|
|||||||
Reference in New Issue
Block a user