This definitely solves all issues by introducing a CacheFilter and
RequestWrapper classes inspired by several works found on the Net.
Also moves the change introduced before in ContextFilter to CacheFilter.
The basic problem is that you only can use once
ServletRequest::getInputStream or the ServletRequest::getReader
Also not both, even once, ie they can be seen as same from this POV.
The integration tests all pass.
Also replace the checked String "</serializable>" by "</serializable" as, like
reported by Jie Zhu, the former could be bypassed by using "</serializable >"
Thanks: Jie Zhu for report
This prevented to run the stable demo, hence the next, weirdly the trunk had
not this problem. Anyway better safe than sorry... Maybe related to Gradle
version or rather libs loaded?
The reason why the stable (and old) demos were not running is because the
EntitySaxReaderTests did not pass
The SOAP and HTTP engines are open doors to security issues.
At https://markmail.org/message/pgtjyh23bazq4s2w I proposed to comment them out
as we did for RMI in the past.
Of cause it must be clearly documented how to use them if needed.
Here is the email content:
After the recent fix for the CVE-2021-26295[1] we discussed with the security
team about the opportunity need to comment out the SOAP and HTTP engines
like we did in the past for RMI[2], this obviously for security reason.
[1] OFBIZ-12167 "Adds a blacklist (to be
renamed soon to denylist) in Java serialisation (CVE-2021-26295)"
[2] OFBIZ-6942 "Comment out RMI related
code because of the Java deserialization issue [CVE-2016-2170] "
I just put a small comment in webtools controller, it should be enough.
The tests pass
(OFBIZ-7113)
With the problem to have a permission service not on the same transaction that the related service [1]
I realized the following improvement to
* unified call evalPermission
* move all related field for permission service on ModelService to ModelPermission
* Remove deprecated code
* add labelized error message
* call as same transaction the permission service by defautl with possibility to overide this rule
* add new attributes on permission model: require-new-transaction and return-error-on-failure
Thanks to Jacques Leroux for the review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866137 13f79535-47bb-0310-9956-ffa450edef68
A patch from Nicolas Malin - adding a generic service to call xml-rpc server. The goal is to have a technical interface to make calls directly from mini-lang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@959071 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
I put also some svn:ignore for shark build and lib diretories and assetmaint/build
I did some by hand lately, too much to remember. They were files with old header but without copyright. A 1st attempt I suppose, will have to check this after this commit.
I add some problems to commit this patch in one piece because it's so huge (specially with Eclipse I had to turn to Tortoise) !
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@499486 13f79535-47bb-0310-9956-ffa450edef68