MNT-22316 - Added pathInfo length validation before attempting substring (#487)

This commit is contained in:
evasques
2021-05-24 13:11:17 +01:00
committed by GitHub
parent 97ff755d58
commit e4cdae71e1

View File

@@ -716,7 +716,7 @@ public abstract class BaseSSOAuthenticationFilter extends BaseAuthenticationFilt
} }
else else
{ {
if(!pathInfo.substring(0, 6).toLowerCase().equals("/cmis/") && !pathInfo.equals("/discovery")) if((pathInfo.length() > 5 && !pathInfo.substring(0, 6).toLowerCase().equals("/cmis/")) && !pathInfo.equals("/discovery"))
{ {
// remove tenant // remove tenant
int idx = pathInfo.indexOf('/', 1); int idx = pathInfo.indexOf('/', 1);