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
(OFBIZ-7073)
With last Amardeep Singh Jhajj's patch we introduced a slow down when starting.
The simple trick is to check if we want to use websocket or not.
By default (webSocket=false in catalina.properties) we don't and I gain 17 sec
on my machine (13 instead of 30). Not a big deal but the log is also cleaner.
And I guess not everybody needs websockets.
This should be documented in the wiki page to come with OFBIZ-7538. Then the
comment for webSocket in catalina.properties should be changed accordingly
If we want to always have webSocket available, then we should start from
Tomcat StandardJarScanFilter class and adapt it to our needs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1763241 13f79535-47bb-0310-9956-ffa450edef68
This should not be a warning but an info. Also I wonder if we really need to
show all these, after all a default fallback should exist in a properties file
Still OFBIZ-7754 needs to be solved...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1763103 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8336)
When going for example to EditProductContent (Product --> Content)
the following error message appears:
2016-09-27 20:02:40,822 |http-nio-8444-exec-7 |UtilProperties |I| null
java.util.MissingResourceException: Can't find resource for bundle
org.apache.ofbiz.base.util.UtilProperties$UtilResourceBundle,
key FieldDescription.sequenceNum
jleroux: this has not been handled right from start and in several changes
later. Rather than throwing an exception in UtilProperties.getMessage() it's
better to check if the bundle contains the key and else to log info
Thanks: Ingo Wolfmayr for report and Rohit Koushal for research
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1763085 13f79535-47bb-0310-9956-ffa450edef68
Minor fix in the preparation of resources to be used in unit tests to be
accessed statically instead of dynamically.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762349 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
of the legacy implementation from Javolution; removed a bunch of unused or
deprecated methods; created some unit tests to test the EntitySaxReader in
isolation. Removed the dependency from Javolution since this was the last class
dependent on it.
(OFBIZ-5169)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762079 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7798)
We slightly changed the old format of the footer. The old format used only the
translated words _uiLabelMap.CommonBuiltOn_ and _uiLabelMap.CommonWith_.
On the other hand, the new format contains the words Branch, Revision,
Built On and Java Version.
We need to translate all four words in the CommonUiLabels.xml and then
incorporate them
old version:
" - Release-revision : ${releasePath}-r${info.entry.commit(revision)},
${uiLabelMap.CommonBuiltOn} ${dateTime} ${uiLabelMap.CommonWith}
Java ${java.version}
new version:
"Branch: ${info.entry.url.text()}" + System.lineSeparator()
"Revision: ${info.entry.commit.@revision}" + System.lineSeparator()
"Built on: ${timestamp}" + System.lineSeparator()
"Java Version: ${org.gradle.internal.jvm.Jvm.current()}"
Thanks: Taher Alkhateeb for the 1st patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762077 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8302)
This was due to r1759555 has Scott spotted on. r1759555 fixed a vulnerability
but as explained in r1759555 commit message we used
>2 redundant mechanisms (better safe than sorry):
>1) linkUrl = URLEncoder.encode(linkUrl, "UTF-8");
>2) sr.append("\" linkUrl=r\"");
Removing the 1st way fixes the reported issue and we are still safe.
I'll have a look at how the catalog/control/FindProduct URL is generated to be
sure it's OK as is
Thanks: Pierre for report, Scott for spotting the issue.
[CVE-2016-4462] OFBiz template remote code vulnerability
By manipulating the URL parameter externalLoginKey, a malicious, logged in
user could pass valid Freemarker directives to the Template Engine that are
reflected on the webpage; a specially crafted Freemarker template could be
used for remote code execution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761978 13f79535-47bb-0310-9956-ffa450edef68
default implementation (JSSEImplementation) in order to override the
getServerFactory(...) method; changed the "catalina" container configuration to
use the default implementation:
org.apache.tomcat.util.net.jsse.JSSEImplementation
The getServerFactory(...) method is only used by the old Tomcat BIO connectors,
that have been deprecated and have been removed since Tomcat 8.5.x; even if
OFBiz is still using Tomcat 8.0.x, it is already using the new NIO connectors.
Thanks: Mark Thomas (@Tomcat) for the useful details about Tomcat internals:
https://lists.apache.org/thread.html/108ab57cd3b65e15aaf2631f2aeb015c3446d544c9d98d1631d16349@%3Cusers.tomcat.apache.org%3E
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761972 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7073)
WebSocket support was not working after the upgrade of trunk to Gradle.
I have slightly changed the FilterJar.java to scan only ofbiz.jar.
It is working now.
jleroux: Of course the trick used before with the discoverable word in jars
filenames no longer makes sense. But since there is now only this ofbiz.jar to
parse it's now less an issue and will not delay OFBiz start in a noticeable
way. At least I did not notice any noticeable effect.
Thanks: Amardeep Singh Jhajj
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761874 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8299)
Currently json files are not compressed. Updating the compressableMimeType setting in the http/https connectors makes them compressed.
Thanks: Chris Howe for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761618 13f79535-47bb-0310-9956-ffa450edef68
working because of an issue in the OFBiz custom TemplateLoader for Freemarker
templates.
(OFBIZ-8292)
The OFBiz custom TemplateLoader now returns null if the resource is missing as
required by the TemplateLoader specification.
Additional cleanups for unused methods in the FreeMarkerWorker class and some
minor fine tuning; improved the way errors are rendered: now the full stack
trace is not shown in the screen but only in the logs.
Thanks: Jacques Le Roux for the report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761586 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
In reference to the below discussion thread, this commit removes a task
which generates the above mentioned jar file which holds a service
definition. The fix is replace the gradle task which automatically
generates service with a flat directiory (META-INF) that defines the
service provides. All tests pass.
Thread: http://markmail.org/message/wzmw2qbacg4hup7r
Thanks: Jacques Le Roux for reporting this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761421 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-7758)
I am running on trunk rev 1751489 on tomahawk theme.
In the browser, right-click and view the page source.
There is duplicate linking of jquery.jgrowl.min.css i.e.
<link rel="stylesheet" href="/images/jquery/plugins/jquery-jgrowl/1.4.1/jquery.jgrowl.min.css" type="text/css"/>
The solution is to remove a hack for JPublish in fex Java classes
and related changes (mostly "page." in ftl and xml files)
Thanks: Rohit Koushal for the path and James Yong the report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761235 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8167) (OFBIZ-8168) (OFBIZ-8169) (OFBIZ-8170) (OFBIZ-8171) (OFBIZ-8208)(OFBIZ-8246)(OFBIZ-8247)(OFBIZ-8259)(OFBIZ-8269)
Thanks: Amit Gadaley for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761231 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7720)
Did not remove usage of old functions as of now, these changes will come in upcoming commits.
Thanks: Amardeep Singh Jhajj for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761177 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
(OFBIZ-8100)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761104 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8099)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761103 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8202)
These are a non functional changes for the accounting component
I forgot to commit the change in EntityListIterator.java, hence a lot of confusion, sorry guys
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761047 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8154)
It's a pity, because of the translations, but the labels starting by "HumanResServices.", which dates from pre Apache era, are not used OOTB, so I remove them here
.portalPageName. is used by demo data
ProductStoreGroup.productStoreGroupName.NA is used as data by ProductTypeData.xml
FormFieldTitle_timesheetPartyId in ProjectMgrUiLabels.xml seems an error. As it duplicates the same in AccountingUiLabels.xml, which is accurate, I remove it from ProjectMgrUiLabels
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760995 13f79535-47bb-0310-9956-ffa450edef68