From 504c7e596b96251234797e50d37f6c4b47413a50 Mon Sep 17 00:00:00 2001 From: Jad El-khoury Date: Thu, 5 Oct 2023 14:47:04 +0200 Subject: [PATCH] handling scenario when getPathInfo() returns null --- .../oauth/core/utils/AbstractAdapterCredentialsFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java index b30b66b82..3b1c29483 100644 --- a/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java +++ b/server/oauth-core/src/main/java/org/eclipse/lyo/server/oauth/core/utils/AbstractAdapterCredentialsFilter.java @@ -203,10 +203,10 @@ protected String getServletUri() { * @return true - the resource is protected, otherwise false */ protected boolean isProtectedResource(HttpServletRequest request) { - return !request.getPathInfo().startsWith("/oauth"); + return (null != request.getPathInfo()) && + !request.getPathInfo().startsWith("/oauth"); } - /** * set Connector for this session *