(OFBIZ-11716)
Because the 2 xmlrpc related requets in webtools (xmlrpc and ping) are not using
authentication they are vulnerable to unsafe deserialization.
thanks: Alvaro Munoz <pwntester@github.com> from the GitHub Security Lab team
(OFBIZ-10432)
1. Added disabled attribute support in ModelFormField with xs:boolean type
2. Removed specific field level disabled attribute support for CheckField and TextField
3. Modified existing usage of disabled attribute as per new implementation.
Thanks: Rishi for the report and Taher, Gil and Jacques for the feedback
(OFBIZ-11714)
In OFBIZ-10539, We missed removing the line which was adding parameters into the map as Ritesh suggested a good way to handle parameters. I've removed that redundant line of code and attaching a patch for the same.
(OFBIZ-11709)
Some people may want to use another TemplateClassResolver than SAFER_RESOLVER
This creates a new templateClassResolver security property and uses it in
FreeMarkerWorker::makeConfiguration by default
(OFBIZ-11709)
Since Freemarker 2.3.17 a known solution to these issues is to register a
TemplateClassResolver in Freemarker configuration in order to limit which
TemplateModels can be instantiated in the templates. The predefined resolver
SAFER_RESOLVER doesn't allow to instantiate the Execute class[4].
So the solution is to add the line
newConfig.setNewBuiltinClassResolver(TemplateClassResolver.SAFER_RESOLVER);
in FreeMarkerWorker.java
* Implemented: Have a service that runs periodically to create CustomTimePeriod records
(OFBIZ-10905)
added: service createFuturePeriod
added: function createFuturePeriod called by createFuturePeriod
added: SystemProperty records called by createFuturePeriod function
added: JobSandbox record to schedule createFuturePeriod service
added: ref to CommonScheduledServicesDemoData.xml in component.xml
* Implemented: Have a service that runs periodically to create CustomTimePeriod records
(OFBIZ-10905)
improved: description
* Implemented: Have a service that runs periodically to create CustomTimePeriod records
(OFBIZ-10905)
improved: groovy code aligning to code formats
(OFBIZ-11686)
Correction in javadoc, <script is not authorize in javadoc because it
can introduce some javascript in javadoc, and so generate an error in
javadoc build.
Replace <script-template/> by "script-template"
The new tag allows us to render a freemarker template containing javascript,
as external script in html instead of inline script.
This helps to reduce CSP errors.
(OFBIZ-11643)
When doing OFBIZ-6849 I forgot to take care of the https attribute of the
security element used in controllers.
It's not used anymore since we used HTTPS everywhere but in request listed in
http.request-map.list property of url.properties. It's even enforced by HSTS for
requests that are not listed in this property.
This removes the https attribute and removes its usage in in controllers.
(OFBIZ-10837)
While working on OFBIZ-11633 I crossed an issue in R18 (not in trunk) where
objects from org.apache.commons.fileupload (namely DiskFileItem and
FileItemHeadersImpl) are not serializable.
While at it I decided to handle at the SafeObjectInputStream level
the "fileItems" case I already crossed with, OFBIZ-11534, in RequestHandler
It has an inconvenient in R18 (not in trunk) where ObjectInputStream can't
handle a null class (of course) and so return a benign exception in log (only).
I believe it's better to handle these specific cases at the lower possible
level in all supported branches.
(OFBIZ-11633)
When you upload a content from the party profile page you don't see a progress
bar. The PartyProfileContent.js is loaded but for some reason is unused or wrong
Mohammad Kathawala mentionned that it was removed with OFBIZ-9299
It was also broken with OFBIZ-11402
Thanks: Mohammad for the track
(OFBIZ-11593)
The "entity/list" request has been put in with OFBIZ-11007. It's used to call
the entitymaint view and so is a demo/didactic duplicate of entitymaint request.
It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label).
It's problematic because since the CSRF token defense was put in you can no
longer filter the entities from the entities list screen, even when the default
NoCsrfDefenseStrategy is used. It works if you use the entitymaint request
instead.
2020-01-19 I proposed in OFBIZ-11306 a solution for such cases.
It was not used because 2020-02-14 I thought it was no longer needed.
It was necessary for this case and implemented with commit e487122.
But as, Rohit Koushal reported, it breaks some functionalities like adding
address/update address during Quick Finalize Order. The issue can also be
reproduced in ecommerce when trying the same while checking out, or quick
checking out, an order.
More generally the error is of this kind:
|27.0.0.1-8009-exec-3 |ControlServlet |E| Error in request handler:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.LinkedList.checkElementIndex(LinkedList.java:555) ~[?:1.8.0_252]
at java.util.LinkedList.get(LinkedList.java:476) ~[?:1.8.0_252]
at org.apache.ofbiz.webapp.control.RequestHandler.getRequestUri(RequestHandler.java:837) ~[main/:?]
and happens with URLs like
updateCheckoutOptions/editcontactmech?DONE_PAGE=checkoutoptions&contactMechId=9015
or
updateCheckoutOptions/editcontactmech?preContactMechTypeId=POSTAL_ADDRESS&
contactMechPurposeTypeId=SHIPPING_LOCATION&DONE_PAGE=checkoutoptions
So I decided to revert the concerned part of commit e487122 and to rather use
entitymaint instead of "entity/list" request.
(OFBIZ-11573)
More details: Method getColumnLabel returns the designated column's suggested title for use in printouts and displays. Method getColumnName returns the designated column's name.
Thanks: Suraj and Jacques for the review.
(OFBIZ-11606)
Fixes "<**:condition" not well managed and generating an error
Changes all the getNodeName() by getLocalName() in the ModelX****Condition.java
Thanks: Olivier
(OFBIZ-11606)
rootElement is not correct for a compound file, it's necessary to do a
UtilXml.firstChildElement(rootElement, "forms"); to be correct.
It's done for screen, form but not for grid !
So correction is now added the correct read of rootElement.
Thanks: Olivier
(OFBIZ-11609)
Fixes the if(test): toString() is not the same than getCanonicalName()
Also while at it, in case of exception, uses NoCsrfDefenseStrategy as default
(OFBIZ-)
After the VM demos crash yesterday, I had a look at the log of trunk demo and
found a lot of recurring errors block due to CsrfUtil::generateTokenForNonAjax.
It's not a big deal but it's annoying to have such useless errors cluttering the
logs
(OFBIZ-11598)
The http.upload.max.sizethreshold size is curently sets to 10240 (10KB) and that
seems small nowadays to me. We could use 1MB.
Also moves mail.spam.name in its mail block
Thanks: Pawan for review
* Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607)
* Revert "Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607)"
This reverts commit 934eaa4539.
* Improved: Added support to consider non-default transaction timeout for Groovy and Simple event handlers.(OFBIZ-11607)
Co-authored-by: Ravi Lodhi <lodhiravi1@gmail.com>
(OFBIZ-11534)
There is an issue in uploading large files, I am able to upload files up to 2 GB
successfully but getting an error when trying to upload a file larger than 2GB.
Example -
1. Go to party profile -
https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin
2. Try to create a party content with a file larger than 2 GB
3. Error on console
jleroux:
For a 2GB+ file you need to set Xmx to more than the double of the file size,
eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M"
You then get another small issue (only in log) when redirecting to send the
partyId parameter.
This is because, DiskFileItem is a temporary Object with a null value contained
in "fileItems" attribute. It can't be detected by UtilMisc::makeMapSerializable
and that makes "fileItems" not serializable. So it must be removed from
reqAttrMap.
Thanks: Chandan Khandelwal for report, Michael for suggesting a very large file
to upload