From 9679cb9d652ed787edb013f18d27d05b65891661 Mon Sep 17 00:00:00 2001 From: Lukas Finster Date: Thu, 29 Jan 2026 12:09:29 +0100 Subject: [PATCH] FIX: port offset applied twice when loading WebSite properties (OFBIZ-13352) --- .../org/apache/ofbiz/webapp/website/WebSiteProperties.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java index 5a80dfc0c4c..cf8fd2dbef8 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/website/WebSiteProperties.java @@ -81,7 +81,7 @@ public static WebSiteProperties from(HttpServletRequest request) throws GenericE Assert.notNull("request", request); WebSiteProperties webSiteProps = (WebSiteProperties) request.getAttribute("_WEBSITE_PROPS_"); if (webSiteProps == null) { - Boolean addPortoffset = true; + Boolean addPortoffset = false; Delegator delegator = (Delegator) request.getAttribute("delegator"); if (delegator != null) { String webSiteId = WebSiteWorker.getWebSiteId(request); @@ -94,6 +94,7 @@ public static WebSiteProperties from(HttpServletRequest request) throws GenericE } if (webSiteProps == null) { webSiteProps = new WebSiteProperties(delegator); + addPortoffset = true; } if (webSiteProps.getHttpPort().isEmpty() && !request.isSecure()) { webSiteProps = webSiteProps.updateHttpPort(String.valueOf(request.getServerPort())); @@ -103,7 +104,6 @@ public static WebSiteProperties from(HttpServletRequest request) throws GenericE } if (webSiteProps.getHttpsPort().isEmpty() && request.isSecure()) { webSiteProps = webSiteProps.updateHttpsPort(String.valueOf(request.getServerPort())); - addPortoffset = false; // We take the port from the request, don't add the portOffset } if (webSiteProps.getHttpsHost().isEmpty()) { webSiteProps = webSiteProps.updateHttpsHost(request.getServerName());