(OFBIZ-9240)
ecomseo trunk and stable (R16)
Get to https://demo-trunk.ofbiz.apache.org/ecomseo/
or https://demo-stable.ofbiz.apache.org/ecomseo/
login => main page logged in
logout => main page, not logged in
login => main page logged in
Use the "Not you" link => 404
Refresh (F5 key) get you to the main page, not logged in
So it works almost correctly but you need a refresh (F5 key) for the "Not you"
link, not sure why yet.
It"s the same locally with OFBIZ-9206 fixed*, w/ or w/o portoffset ecommerce
trunk and stable (R16)
Get to https://ofbiz-vm2.apache.org:8443/ecommerce
or https://ofbiz-vm2.apache.org:18443/ecommerce
login => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, logged in
logout => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, not logged in
login => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, logged in
use the "Not you" link => blank page (no 404 in access log)
Refresh (F5 key) get you to the main page, not logged in
So it works almost correctly but you need a refresh (F5 key) between in the
3 cases, not sure why yet.
It's the same locally with OFBIZ-9206 fixed, w/ or w/o portoffset
Rohit:
The sequencing order of ControlFilter and ContextFilter is causing this problem.
I tried to swap the order in case ecommerce but changing the sequence will not
work because other filters(like ContentUrlFilter, CatalogUrlFilter) depends on
the context prepared by ContextFilter.
The issue is like when we are doing chaining of request using request-redirect
than one request attribute(FORWARDED_FROM_SERVLET) set to TRUE from
ControlServlet. In case of ecommerce ContextFilter run before ControlFilter
which copies all the attribute from parent request to redirect request and
when execution reaches the ControlFilter for the redirect request than request
will fail to hit the servlet due to the code present
at line 126(ControlFilter.java).
To fix this problem I removed the code which copies all the attribute from
parent request to redirect request because this thing is already taken care in
the RequestHandler.
Thanks: Rohit and Jacopo for the analysis and the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805677 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9571)
No functional change.
We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html :
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent
rounding mode is largely obsolete; the enumeration values of the RoundingMode
enum, (such as RoundingMode.HALF_UP) should be used instead.>>
That's an easy global replacement. But it also needs to import the RoundingMode
class. It was 26 files so I decided to rather clean all the imports in all files
with the help of Eclipse.
This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
(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
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801094 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9206)
After my conclusions at OFBIZ-9240 I decided to reapply the changes and will
test on demos.
Because WebSiteProperties reuse the port initially found in the 1st login URL
I tried to replace locally
port.https=8443
by
port.https=
in url.properties (w/o SystemProperty) and did not face any issue but with
portOffset. This is due to how the WebSiteProperties class works and there is also
an easy fix: don't add twice the portOffset when it's build from the request,
and only then. Keep it as is when it's build from a WebSite GenericValue.
We then trust the user and don't rely on the request.
I also removed the deprecated RequestHandler.getDefaultServerRootUrl()
I think it was time...
Thanks: Pierre Smits for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784930 13f79535-47bb-0310-9956-ffa450edef68
No functional change, cleaner code
........
No functional change, fixes a typo
........
Fixed: "Login and logout process in demos shows a certificate issue"
(OFBIZ-9206)
Also fixes "16.11 ofbizUrl include host+port and break some reverse-proxy/docker
setups"
(OFBIZ-9224)
It was an easy fix, I just imported
<SystemProperty systemPropertyId="port.https" systemResourceId="url"
systemPropertyValue=""/>
in trunk demo and all work perfectly.
I also tried to replace locally
port.https=8443
by
port.https=
in url.properties (w/o SystemProperty) and did not face any issue but with
portOffset. This is due to the WebSiteProperties class works and there is also
an easy fix: don't add twice the portOffset when it's build from the request,
and only then. Keep it as is when it's build from a WebSite GenericValue.
We then trust the user and don't rely on the request.
I also removed the deprecated RequestHandler.getDefaultServerRootUrl()
I think it was time...
Thanks: Pierre Smits and Leonard Lin for reports
........
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784760 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9206)
Also fixes "16.11 ofbizUrl include host+port and break some reverse-proxy/docker
setups"
(OFBIZ-9224)
It was an easy fix, I just imported
<SystemProperty systemPropertyId="port.https" systemResourceId="url"
systemPropertyValue=""/>
in trunk demo and all work perfectly.
I also tried to replace locally
port.https=8443
by
port.https=
in url.properties (w/o SystemProperty) and did not face any issue but with
portOffset. This is due to the WebSiteProperties class works and there is also
an easy fix: don't add twice the portOffset when it's build from the request,
and only then. Keep it as is when it's build from a WebSite GenericValue.
We then trust the user and don't rely on the request.
I also removed the deprecated RequestHandler.getDefaultServerRootUrl()
I think it was time...
Thanks: Pierre Smits and Leonard Lin for reports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784549 13f79535-47bb-0310-9956-ffa450edef68
I did not even notice I committed this bunch of WIP stuff. I guess I clicked
somewhere while my machine was too buzy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781367 13f79535-47bb-0310-9956-ffa450edef68
I did not even notice I committed this bunch of WIP stuff. I guess I clicked
somewhere while my machine was too buzy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781366 13f79535-47bb-0310-9956-ffa450edef68
ExternalLoginKeysManager.getExternalLoginKey(...) method.
Minor refactoring of the getExternalLoginKey(...) method to make it more
friendly to unit tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776138 13f79535-47bb-0310-9956-ffa450edef68
tokens from the LoginWorker class to a new class named ExternalLoginKeysManager.
Improved Javadocs in the new class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1775807 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9144)
This is the first commit to the above mentioned issue which fixes many javadoc
errors dispersed through the different components. The fixes are not
necessarily improvements to the javadocs but rather making them valid javadocs
to prevent reporting errors from gradle
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774154 13f79535-47bb-0310-9956-ffa450edef68
.getAttribute() never returns null, it defaults to empty
Removes commented out import net.sf.json imports we use Jackson only (no license
issues)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1770543 13f79535-47bb-0310-9956-ffa450edef68
trying to unbox
(OFBIZ-8342)
site-conf.xsd doesn't define transaction-timeout as being mandatory but
ConfigXMLReader treats it as one and in the absence of the attribute an
exception is being thrown causing the application to break.
jleroux: I have slightly modified the patch, eventElement.getAttribute never
returns null, default to empty
Thanks: Valery Chenzo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1770540 13f79535-47bb-0310-9956-ffa450edef68
conditional.xml to conditionalLabels.xml
DefaultMessages.xml to DefaultMessagesLabels.xml
EmailPassword.xml to EmailPasswordLabels.xml
Found while working on OFBIZ-8321
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1764261 13f79535-47bb-0310-9956-ffa450edef68
multitenant mode on, caused by the recent refactoring to ContextFilter.
(OFBIZ-8338)
Thanks: Ingo Wolfmayr for the bug report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1763251 13f79535-47bb-0310-9956-ffa450edef68
code using it, that wraps most of the OFBiz integration with FreeMarker.
This is the list of the main modifications:
* simplified and cleaned up the public methods of FreeMarkerWorker, used to
retrieve and render Freemarker templates and changed client code accordingly to
use them
* removed unused methods in FreeMarkerWorker and made some others private
* improved the integration code in FreeMarkerWorker to better use the Freemarker
API and specifically to leverage the various TemplateLoaders and the Freemarker
caching mechanism; it is now possible to switch the OFBiz legacy template
caching mechanism to use the Freemarker one instead
* improved the implementation of Freemarker template rendering from strings
(used by DataResourceWorker): it now leverages the Freemarker's
StringTemplateLoader that provides the ability to cache the strings, retrieved
from DataResources records, based on the timestamp of the last modification
* moved freemarkerImports.properties from "widget" to "base" component, and
changed its content (and the content of the associated templates
AutoImportTemplate.ftl and HtmlTemplate.ftl) to remove the dependency from base
to widget&common; some resources of "widget" and "common" are still referenced
from AutoImportTemplate.ftl (that is in "base") but even if they are soft
dependencies: if they are missing the system will load properly without any
error or warning; before this change it was impossible to use, or unit test,
FreeMarkerWorker before the "widget" and "common" components were loaded by the
system, now it is possible
* created a new class for unit tests for FreeMarkerWorker, named
FreeMarkerWorkerTests: at the moment it contains just one simple unit test but
more should be implemented
* refactored WebToolsServices.entityImport(...) to leverage the
FreeMarkerWorker.renderTemplate(...) method to run the Freemarker template,
rather than dealing with the Freemarker API directly; this is now possible
thanks to the cleanups and improvements done in the FreeMarkerWorker class; this
same approach should be implemented for a few other similar integration points
(mostly in the "content" component); this is a TODO item
* moved the encodeDoubleQuotes(...) method from FreeMarkerWorker to
MacroFormRenderer and made it private since this is the only calss using it and
its logic is not related to FreeMarker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762227 13f79535-47bb-0310-9956-ffa450edef68
the initialization of the ControlFilter.
These unit tests are experimental but interesting because they provide test
coverage in isolation for some aspect of the framework that were not covered
before or only covered by integration tests.
The tests for the ControlFilter are particularly interesting because they
leverage Mockito to run the test in isolation by mocking the FilterConfig
object.
Please review and run these tests in your local environment, provide your
feedback and report any issues you may find: this will help to define a pattern
for the definition of unit tests that could be applied more extensively.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761440 13f79535-47bb-0310-9956-ffa450edef68
default encoding for the requests and some fine tuning of ControlFilter
settings; removed no more used code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761424 13f79535-47bb-0310-9956-ffa450edef68
new ControlFilter, from the ContextFilter; modified existing applications to use
the two filters in a chain; removed from the other specialized filters all the
logic that was duplicated or extended from ContextFilter.
A web application, in order to leverage the OFBiz framework, requires that a
series of objects are in its contexts (servlet context, session and request)
such as "delegator", "delegatorName", "dispatcher", "security" etc. etc...
This setup is performed by the logic contained in the servlet filter implemented
by the ContextFilter class.
The execution of this logic is required for the application to run properly.
However, before this commit, in the ContextFilter there was other logic, related
to access control and redirection rules (some of them performed in coordination
with the ControlServlet), making it difficult to deploy this filter in all the
web applications, especially the ones that implement special handling of paths.
In fact, this filter was deployed in most but not all the web application in the
OFBiz codebase: specifically it was not deployed in web applications that
require the execution of other filters (e.g. CatalogUrlFilter, etc...) like the
ones in the "ecommerce" and "solr" components.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761304 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7120)
This is the first patch from the ticket and is for the implementation done to support the multisite feature in specialpurpose/cmssite component.
Thanks Mohammed Rehan Khan for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761150 13f79535-47bb-0310-9956-ffa450edef68
defined in the new ControlFilter class.
The old constant defined in ContextFilter will soon be removed together with the
debug field, that is not currently used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760949 13f79535-47bb-0310-9956-ffa450edef68
Modified the rdering of import statements, minor changes to remove some
unnecessary dependencies on util classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760947 13f79535-47bb-0310-9956-ffa450edef68
currently available in the ContextFilter.
At the moment the filter is not used but, once the "controller" logic will be
removed by the ContextFilter, the applications' web.xml files will be updated
to deploy the two filters in a chain:
* ControlFilter will filter and redirect requests
* ContextFilter will set the required objects in the contexts (session and
request) like the delegator, dispatcher etc...
This separation of concerns will make the deplyment more flexible when
additional filters are required.
While the logic in this new filter is functionally mostly the same of that
currently in ContextFilter, this new implementation is more efficient and the
behavior and configuration parameters are clearly discribed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760725 13f79535-47bb-0310-9956-ffa450edef68
if it is not set already by the client.
Before this change the filter used to override the character encoding, even if
it was specified in the http request.
Also removed some unused imports and comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760528 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8224)
This commit removes the support for the Bean Scripting Framework (BSF) from the OFBiz framework:
no application code was using this since several years and there are better and more modern tools at the present time.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760384 13f79535-47bb-0310-9956-ffa450edef68