(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Ed Mack
This adds
org.apache.ofbiz.widget.model.ModelTheme
java.util.Collections
java.util.LinkedList
java.util.ArrayList
java.util.TimeZonz
Thanks: Ed Mack at OFBIZ-10876
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856484 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
There was a recurring typo in previous commit.
For arrays of primitives it should be
"\\[Z","\\[B","\\[S","\\[I","\\[J","\\[F","\\[D","\\[C"
and not
"[Z","[B","[S","[I","[J","[F","[D","[C"
It shows how tired I'm :/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856460 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
There was a recurring typo in previous commit.
For arrays of primitives it should be
"[Z","[B","[S","[I","[J","[F","[D","[C"
and not
"[Z ","[B ","[S ","[I ","[J ","[F ","[D ","[C "
Just spotted that while reviewing again (did not have the time to test)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856459 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Ed Mack
This adds all arrays of primitives and java.math.BigDecimal
Thanks: Ed Mack at OFBIZ-10876
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856455 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Wolfgang Rauchholz on user
ML
This adds java.math.BigDecimal and "[B" (ie [B == byte[] and I don't understand
why in this case "byte[]" does not work)
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Ingo Wolfmayr at OFBIZ-10870
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856405 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10753)
When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it
On controler.xml we can now use :
<errorpage>/error/error.jsp</errorpage>
or
<errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)
On your theme you can add your own error page :
<template>
...
<template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
+ <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
</template>
The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.
Thanks to Marine Desmarchelier for the error page design
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10832)
Since most nodes will contain text then it will be more efficient to do a null check after retrieving nodeValue.
Thanks: Scott for your valuable inputs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855898 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Wolfgang Rauchholz on user
ML
This adds java.util.Date
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Wolfgang Rauchholz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855492 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Wolfgang Rauchholz on user
ML
This adds java.sql.Timestamp
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Wolfgang Rauchholz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855488 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10832)
As per the code, getTextContent() method is used get text content of the node and its descendants but the node.getTextContent() always return Null for the following Node type
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE [1]
Since we can't get the text value of Document, Document Type and Notation Node, thus simply return the same object.
[1] https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Node.html#getTextContent()
Thanks: Deepak Dixit for reviewing the code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855403 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Deepak at OFBIZ-10837
This adds sun.util.calendar.ZoneInfo
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Deepak Dexit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855371 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Rohit at OFBIZ-10573
This adds FlexibleStringExpander
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Rohit Koushal
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855287 13f79535-47bb-0310-9956-ffa450edef68
‘ScriptHelper’ is a mechanism used to add some useful bindings to
scripts. This feature has been introduced in revision 1299924 by
Adrian Crum as part of an general effort of supporting the Generic
Scripting Engine specified by JSR-223.
Previously this mechanism was extensible, however it appears to be
undesirable (nor used in practice) to extend the bindings available to
services since the internal service implementations are highly coupled
to those bindings. As a consequence the usage of the Abstract Factory
pattern which was used for that purpose is now removed.
The side effect of this change is that we have now simpler code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854668 13f79535-47bb-0310-9956-ffa450edef68
Previously the artifact info classes were using the
‘FlexibleLocation#resolveLocation(String, ClassLoader)’ method by
passing ‘null’ as the second argument which is equivalent to calling
the more specific ‘FlexibleLocation#resolveLocation(String)’ method
with the same first argument.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854667 13f79535-47bb-0310-9956-ffa450edef68
The ‘parseClass(InputStream in, String location)’ and
‘parseClass(InputStream in, String location, GroovyClassLoader
groovyClassLoader)’ methods from GroovyUtil are now merged in a
private and documented method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854663 13f79535-47bb-0310-9956-ffa450edef68
The ‘runSync’ method of the Groovy engine was only passing its
arguments to the serviceInvoker method which was private and used only
by the ‘runSync’ method. By inlining this private method the work is
now done directly in the ‘runSync’ method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854656 13f79535-47bb-0310-9956-ffa450edef68
According to Groovy documentation [1] the following construction:
CompilerConfiguration cfg = new CompilerConfiguration();
cfg.setScriptBaseClass(scriptBaseClass);
groovyClassLoader =
new GroovyClassLoader(GroovyUtil.class.getClassLoader(), cfg);
is equivalent to running the a script containing the ‘@BaseScript’
annotation. Previously in ‘org.apache.ofbiz.base.util.GroovyUtil’
instead of choosing one solution, we were doing both. Now we only
rely on the construction described above.
[1] http://docs.groovy-lang.org/latest/html/documentation/#_script_base_classes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854652 13f79535-47bb-0310-9956-ffa450edef68
Previously the way integration tests were run allows having a specific
dispatcher and delegator for each test. Removing this feature helps
future simplification of the way integration tests are actually run by
allowing the algorithm to assume only one dispatcher and delegator for
all the tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854650 13f79535-47bb-0310-9956-ffa450edef68
communicate using the HTTP/2 protocol, when the client supports it.
With this commit HTTP/2 is enabled by default, by setting upgradeProtocol=true
in the http and https connectors of Tomcat; however the connectors will continue
to support HTTP/1.1 (the switch to HTTP/2 is negotiated with the client using
the "HTTP Upgrade Protocol"); if the new "upgradeProtocol" property, introduced
in this commit for this specific purpose, is not set (as it would be the case in
custom configuration files) then the new protocol will not be enabled.
Additional Tomcat specific configuration options are available (see
https://tomcat.apache.org/tomcat-9.0-doc/config/http2.html) but this commit
doesn't implement the ability to set them (this is left to a future enhancement,
if there will be a requirement to change the default values).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854532 13f79535-47bb-0310-9956-ffa450edef68
The comparator argument of this method was always ‘null’. Use
‘java.util.TreeMap()’ constructor in the inlined function which is
equivalent to passing ‘null’ to ‘java.util.TreeMap(Comparator)’.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854432 13f79535-47bb-0310-9956-ffa450edef68
Those tests requires additional constructors for ‘ComponentConfig’
and ‘ComponentConfig.WebappInfo’ to be able to instantiate them
without an XML element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854430 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list I used was not complete.
This adds "java.util.HashMap", "Boolean", "Number", "Integer" which are the ones
missing I found so far.
Maybe other classes could still miss OOTB. So I added a warning in
SafeObjectInputStream::resolveClass
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1853745 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10814)
Fixes incorrect retrieval of the Authorization header JWT token.
Fixes wrong API usage for the key parameter which assumed the key is
provided in BAS64 format.
Refactored the code to use helper methods for key and auth header
retrieval.
Javadoc corrections and enhancements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852882 13f79535-47bb-0310-9956-ffa450edef68
This commit refactors the startup bootstrapping logic to remove any references to the
StartupLoader API and any related files. This is due to the fact that any loaders
including the old POS is completely removed from the system. Thus this improvement
simplifies the startup logic and makes it easier to maintain.
Thank you: Mathieu Lirzin for the patch, careful review and patience
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852847 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10818)
Set transaction timeout of 2hrs for the actual data transmission services.
Removed unwanted service updateEntitySyncRunning
Called the tracking and status update services in new transaction so that record can be maintain after current transaction rollback
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852587 13f79535-47bb-0310-9956-ffa450edef68
When OFBiz render a platform specific with a ftl template file, the widget verbosity throw function ModelWidget.widgetBoundary() was called with parameters as context. However this function control if a parameters is already present, so if you set a context.widgetVerbose = false, is was ignored and widget verbosity was present for ftl rendering.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852532 13f79535-47bb-0310-9956-ffa450edef68
slash inside its name
(OFBIZ-10766)
Deepak Nigam reported on dev ML:
When there is one web app with the empty mount point (i.e. deployed on root),
the auto-login cookie will not work for that particular webapp due to the change
in the path of the cookie from "/" to "/" + applicationName. Because the system
will try to find the cookie at the "/" but it is actually at "/" + applicationName.
Thanks Deepak for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851998 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10771)
The ObjectType class contains utilities that extends the Java reflection API by
defining methods which accepts string representation of Java types and classes.
It appears that this class contains unneeded code which is either dead or is
redundant with the services already defined in the reflection API
Removes the useless isOrSubOf, instanceOf and interfaceOf methods.
Additionally it removes the getInstance method which is not used anywhere in
the framework or in the plugins.
Also includes similar changes in
AbstractConverter.java
Converters.java
DateTimeConverters.java
GenericEntity.java
IfInstanceOf.java
Thanks: Mathieu
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851701 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10815)
Adds translations es, es-CL in files:
CommonUiLabels
PartyUiLabels
MarketingUiLabels
HumanResUiLabels
jleroux: I removed duplicates in
CommonListAll
CommonLookupWhitepages
CommonManage
CommonNbr
CommonNoRecordFound
Seems CommonListAll and CommonNbr came from OFBIZ-7345 but I can't understand
why they only show now
Thanks: Jonathan Cardenasvar
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851611 13f79535-47bb-0310-9956-ffa450edef68
The ModelForm.java is using an incorrect parameter name for sorting if a form
extends from another form. This fixes it by using the correct parameter name.
Thanks: Gil Portenseigne for reviewing and providing a better implementation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851426 13f79535-47bb-0310-9956-ffa450edef68
places
(OFBIZ-10812)
While reviewing OFBIZ-10811 I found that I could improve ObjectType class on 2
points:
doRealCompare returning null instead of a boolean
simpleTypeOrObjectConvert Javadoc (2 other instance not documented)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851363 13f79535-47bb-0310-9956-ffa450edef68