Author: jleroux
Date: Thu Jul 6 19:02:01 2017
New Revision: 1801094
URL:
http://svn.apache.org/viewvc?rev=1801094&view=revLog:
Fixed: Missing secure port in URLs when sending mails
(OFBIZ-9449)
While working on an issue reported by Pierre Gaudin on user ML
https://s.apache.org/gDo3, here quoted:
I found another issue while testing: the port 8443 is missing in the URL used
underneath by the form reported by Pierre.
It was broken by OFBIZ-9206 where I removed the value of port.https in
url.properties.
It's not an issue if you set the value of port.https, or let it empty when
using a SSL certificate on a production server. But if you try locally
(localhost) then the URL misses the 8443 port.
Solution append 8443 as default secure port when using localhost
Modified:
ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/OfbizUrlBuilder.java
Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/OfbizUrlBuilder.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/OfbizUrlBuilder.java?rev=1801094&r1=1801093&r2=1801094&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/OfbizUrlBuilder.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/OfbizUrlBuilder.java Thu Jul 6 19:02:01 2017
@@ -162,6 +162,8 @@ public final class OfbizUrlBuilder {
buffer.append(server);
if (!webSiteProps.getHttpsPort().isEmpty()) {
buffer.append(":").append(webSiteProps.getHttpsPort());
+ } else if ("localhost".equals(server)) {
+ buffer.append(":").append("8443"); // We suppose that when localhost is used the default secure port is 8443
}
} else {
String server = webSiteProps.getHttpHost();