This is an automated email from the ASF dual-hosted git repository.

Lukas-Finster pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new fda763909b Implemented: Prevent unnecessary session creation during 
rest-api authentication (OFBIZ-12033) (#2028)
fda763909b is described below

commit fda763909bac360c850e34c8a4c245c15b3f1aa9
Author: Lukas-Finster <[email protected]>
AuthorDate: Wed Sep 16 13:58:03 2026 +0200

    Implemented: Prevent unnecessary session creation during rest-api 
authentication (OFBIZ-12033) (#2028)
---
 .../java/org/apache/ofbiz/ws/rs/security/auth/HttpBasicAuthFilter.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/security/auth/HttpBasicAuthFilter.java
 
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/security/auth/HttpBasicAuthFilter.java
index 39ff92f692..9de425f6e8 100644
--- 
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/security/auth/HttpBasicAuthFilter.java
+++ 
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/security/auth/HttpBasicAuthFilter.java
@@ -23,7 +23,6 @@ import java.util.Base64;
 import java.util.Map;
 
 import org.apache.ofbiz.base.util.Debug;
-import org.apache.ofbiz.base.util.UtilHttp;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.entity.Delegator;
@@ -117,7 +116,7 @@ public class HttpBasicAuthFilter implements 
ContainerRequestFilter {
         LocalDispatcher dispatcher = (LocalDispatcher) 
servletContext.getAttribute("dispatcher");
         try {
             result = dispatcher.runSync("userLogin",
-                    UtilMisc.toMap("login.username", userName, 
"login.password", password, "locale", UtilHttp.getLocale(httpRequest)));
+                    UtilMisc.toMap("login.username", userName, 
"login.password", password, "locale", httpRequest.getLocale()));
         } catch (GenericServiceException e) {
             Debug.logError(e, "Error calling userLogin service", MODULE);
             throw new ForbiddenException(e.getMessage());

Reply via email to