Commit Graph
10665 Commits
Author SHA1 Message Date
Jacques Le Roux 30cb6da0b1 Fixed: Secure the uploads (OFBIZ-12080)
Prevents special bytes in filename
Adds some deniedFileExtensions
2022-02-18 18:35:09 +01:00
Jacques Le Roux 3f69a54891 Fixed: Secure the uploads (OFBIZ-12080)
Prevents billions laugh attacks
2022-02-18 15:45:07 +01:00
Jacques Le Roux 9a5e1c5efc Fixed: Secure the uploads (OFBIZ-12080)
In previous comment, to prevent linked images inside SVG I used xlink:href
That's no good, it must be followed by <<="http">>, this does it. Else a lot
of SVP images would not be loadable. Because xlink:href can be used in other
cases.
2022-02-18 15:32:31 +01:00
Jacques Le Roux 54e544d302 Improved: Create a deny list to reject webshell tokens (OFBIZ-12324)
Prevents CSV injection (MS Excel or Open Office)
2022-02-18 13:50:50 +01:00
Jacques Le Roux 756b5d237e Fixed: Secure the uploads (OFBIZ-12080)
Prevents
* too long lines (10 000) by default
* linked images inside SVG

Adds a comment about double extensions not allowed
2022-02-17 19:01:05 +01:00
Jacques Le Roux 0e83f09323 Improved: Error in uploading very large files, ie >2GB (OFBIZ-11534)
I reopened, forgot that you need to set -PjvmArgs, as I commented before:
<<For a 2GB+ file you need to set Xmx to more than the double of the file size,
eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M">>

This also adds information in security.properties:
<<By default (OOTB) OFBiz is protected against Large File Denial of Service>>
2022-02-16 17:15:24 +01:00
Jacques Le Roux 887515beef Improved: no functional change, adds a logerror in ProgramExport.groovy
For a reason I did not find, this morning I did not receive any error message in
UI when the Groovy Program content was rejected for security reason.
So I added a logerror  message to be sure something will be reported in case
this issue popup again.

BTW I switched to 22.01 branch and it was OK, then back to trunk it was OK again,
weird :/
2022-02-15 14:11:33 +01:00
Jacques Le Roux 4fa50c87b7 Improved: Create a deny list to reject webshell tokens (OFBIZ-12324)
After reviewing https://github.com/nsacyber/Mitigating-Web-Shells this mostly
adds as tokens the "Linux applications commonly used by attackers and rarely
launched by benign Apache applications"
2022-02-15 07:54:17 +01:00
Jacques Le Roux 719ca41467 Improved: Create a deny list to reject webshell tokens (OFBIZ-12324)
After reviewing https://docs.oracle.com/cd/B14099_19/web.1012/b14014/jspxml.htm,
since we use "<jsp:" this removes "scriptlet>", "declaration>" and "expression>".
They are redundant with "<jsp:"; "<jsp:" covers those already.

Also adds eval( for js and shrinks base64_decode to decode, and processbuilder
to process because of OFBIZ 12571

I always test the denied tokens against a lib of  images with 33 600 elements (
3.99 GB). If an image contains the token it can't be in the denied list.
2022-02-14 13:16:55 +01:00
Jacques Le Roux 28092f2a75 Fixed: Groovy denied list bypass causes post-auth RCE from webtools/control/ProgramExport (OFBIZ-12571)
The 1st issue was due to use of processbuilder token. It has been added to
deniedWebShellTokens in security.properties by f2cf262 commit for OFBIZ 11948
The tokens function (for js) and class have been added since while browsing
https://github.com/tennc/webshell

As mention the related deniedWebShellTokens TODO comment: "TODO.... to be continued
with known webshell contents... a complete allow list is impossible anyway...

So, later a deeper review of Groovy sandbox possibilities will be done..

Thanks: Y4er for report
2022-02-11 10:52:43 +01:00
Jacques Le Roux 97b3627341 Improved: no functional changes, removes trailing spaces just to pass checkstyle
Check passed locally but not on GH nor BuildBot
2022-02-10 18:27:07 +01:00
Jacques Le Roux 1878e99a7b Improved: Possible authenticated attack related to Tomcat CVE-2020-1938 (OFBIZ-12558)
Change a bit the documentation while workin on
https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure wiki page
2022-02-10 17:21:22 +01:00
Jacques Le Roux f2cf262cf5 Fixed: Remote Code Execution (File Upload) Vulnerability (OFBIZ-11948)
This fixes and improves file upload.

Refactor a bit SecuredUpload class and fixes:
Prevent double extensions
Check extensions
Improves getMimeTypeFromFileName() by checking is file exists
In isValidImageFile() finally use isValidText() bypassing encoding

Completely refactor deniedWebShellTokens in security.properties by re-adding
removed tokens in last commit and adding several new ones. I have still to check
encoded, encrypted and obfuscated webshells)
Modifies SecurityUtilTest::webShellTokensTesting accordingly
While at it better format commonsImagingSupportedFormats, deniedFileExtensions
and imagejSupportedFormats properties for legibility.

Check if createAnonFile service is used in GroovyBaseScript.groovy and if a
complete file name is used (file exist) check, using SecuredUpload, extensions
and prevent double extensions, actually check all the file and stop there.

Adds some "Check if a webshell is not uploaded" comments in
ContentManagementServices.java
DataServices.java
ScaleImage.java
FrameImage.java
ImageManagementServices.java
ProductServices.java
HttpRequestFileUpload.java
ProgramExport.groovy

Trivial comments fixes in catalog.properties

Also fixes OFBIZ 12571 (I use here a space because of pending INFRA 22843)
by simply adding processbuilder to deniedWebShellTokens
2022-02-10 14:17:34 +01:00
Jacques Le Roux ff5e473109 Improved: Possible authenticated attack related to Tomcat CVE-2020-1938 (OFBIZ-12558)
As reported by Michael, secretRequired value must be false because secret value
is empty. Else a notifying message appears in log saying that AJP is not available.

This uncomment out secretRequired, so its value is now false, and document more
notably about that. I'll later add more information in the
https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure wiki page

Thanks: Michael for report
2022-02-10 14:17:34 +01:00
Jacques Le Roux aa1547314b Documented: Possible authenticated attack related to Tomcat CVE-2020-1938 (OFBIZ-12558)
Explains that the current AJP config works only for localhost
2022-02-10 14:17:33 +01:00
Jacques Le Roux 30770e1cea Fixed: Remote Code Execution (File Upload) Vulnerability (OFBIZ-11948)
In SecuredUpload::isValidImageFile I initially used isValidText() and thought
that decoding would be better so finally used isValidTextFile() instead. But
then valid images files are not passing. So this replaces isValidTextFile by
isValidText there.

Also while at it removes few other PHP tokens, now useless (hopefully, I have
still to check encoded and encrypted PHP webshells), from
security::deniedWebShellTokens. The less tokens we have the better the whole is
legible.
Improves related comments.

Modifies SecurityUtilTest::webShellTokensTesting accordingly
2022-02-05 10:13:44 +01:00
Jacques Le Roux 036a1fde29 Fixed: Remote Code Execution (File Upload) Vulnerability (OFBIZ-11948)
I forgot about SecurityUtilTest::webShellTokensTesting. This fixes it.

Note that I expect to simplify and remove more tokens for PHP, but I have 1st
other things to do...
2022-02-04 15:03:51 +01:00
Jacques Le Roux 5b1843f1c0 Fixed: Possible authenticated attack related to Tomcat CVE-2020-1938 (OFBIZ-12558)
Despite OFBIZ-11407, the 2 values secretRequired and especially
allowedRequestAttributesPattern are commented out because of OFBIZ-12558

The Tomcat default values will be used as recommended by
https://tomcat.apache.org/tomcat-9.0-doc/config/ajp.html#Introduction
This is in relation with
https://tomcat.apache.org/security-9.html#Fixed_in_Apache_Tomcat_9.0.31
and
https://tomcat.apache.org/tomcat-9.0-doc/security-howto.html#Connectors

Thanks: Lion Tree for report
2022-02-04 12:28:47 +01:00
Jacques Le Roux b0b02034ee Fixed: Remote Code Execution (File Upload) Vulnerability (OFBIZ-11948)
Lion Tree <liontree0110@gmail.com> has reported us that
"CVE-2020-1938 is not fully fixed".

Though it was fixed by OFBIZ-11407, it still possible for an authenticated user
to upload a webshell included in an image using one of the upload possibilities
in OFBiz. That is not new and covered by OFBIZ-12080 "Secure the uploads", but
was still incomplete.

This enforces the secured uploads by
* checking in SecuredUpload::isValidImageFile that a webshell is not embedded in
an image.
* Keeping only "<%" as a denied token for JSP webshells, instead of currently
"<%@ page"
* Adds "application/text/x-ruby" to SecuredUpload::isExecutable

Also
* Adds "<jsp", and "<?" for PHP. Even if OFBiz does not use PHP at all,
it's often installed on servers.
* Removes "import=\"java" and "runtime.getruntime().exec(". They are no
longer useful since "<%" and "<jsp" block them.
* Remove php token since I'll put "<?" in.
* Adds "#!", rather than adding other shebangs like perl,python and ruby

This will make deniedWebShellTokens more understandable.

But I'm conscious that despite SecuredUpload::isExecutableI I still need to
better handle encoded webshells. I'll do that soon in a second approach.

I'll also certainly more prune PHP related tokens.

Thanks: Lion Tree for report
2022-02-04 12:10:05 +01:00
Nicolas Malin c6e44d143f Fixed: Attribute default-field-type hidden doesn't work for auto-fields-service element (OFBIZ-12555)
Fix the compilation error on build bot that not support java11, downgrade the code to java8
2022-02-03 10:46:30 +01:00
Nicolas Malin 850a32df17 Reverted: Improved: no functional change, adds a BuildBot badge (INFRA-22807)
This reverts commit 884864b07f that contains a revert error of 9ea7afe97a
2022-02-03 10:46:10 +01:00
Jacques Le Roux 884864b07f Improved: no functional change, adds a BuildBot badge (INFRA-22807)
It works locally (once you have installed Ruby, asciidoctor and
asciidoctor-diagram). CHecking that it's also OK on BuildBot, let's see result
at https://nightlies.apache.org/ofbiz/trunk/readme/html5/
2022-02-03 09:53:55 +01:00
Nicolas Malin 9ea7afe97a Fixed: Attribute default-field-type hidden doesn't work for auto-fields-service element (OFBIZ-12555)
When you define a widget form and wish populate hidden fields with the element auto-fields-service, OFBiz rendering each as edit field type.

    <form name="ListPartyQuals" ...>
        <auto-fields-service service-name="updatePartyQual" default-field-type="hidden"/>
    </form>

The problem came from the function ModelFormFieldBuilder.induceFieldInfoFromServiceParam didn't manage the case "hidden"

By the way, this function is "if" forest, and simplify reading.
2022-02-02 18:07:37 +01:00
Nicolas Malin d30d362aa6 Fixed: Element condition-[expr/list/object] doesn't work with compound (OFBIZ-12546)
When you create an entity-condition in a form or grid under a compound element, to write a valid xml you write it with the namespace like this :

    <wf:actions>
        <wf:entity-condition entity-name="PartyRelationship"...>
            <wf:condition-list>
                <wf:condition-expr field-name="partyIdFrom" from-field="parameters.partyIdFrom"/>
                <wf:condition-expr field-name="partyIdTo" from-field="parameters.partyIdTo"/>
            </wf:condition-list>
        </wf:entity-condition>
    </wf:actions>

This failed when OFBiz execute the search with error Invalid element with name '[wf:condition-expr]' found under a condition-list element.

The error came from the class EntityFinderUtil.ConditionList who analyze the condition-list's children with the namespace + node name instead take only the node name.

    if ("condition-expr".equals(subElement.getNodeName()))

To solve this issue we only check the local node name regardless from the namespace used.
2022-01-31 14:39:57 +01:00
Jacques Le Roux 7562476e1e Fixed: Attribute 'placeholder' is not allowed to appear in element 'text'
Completes the previous fix by Wei Zhang. This was committed at a wrong place
for OFBIZ-5341. Only text was concerned, not date-time
2022-01-29 10:56:15 +01:00
bjugl 90995f090f Fixed: Webapp Position overrides older entries. (OFBIZ-12496) (#454) 2022-01-28 10:25:11 +01:00
Nicolas Malin 52c3e61a95 Improved: Use flexible expander to resolve the area target on call back (OFBIZ-12509)
When you use a callback, at this time we haven't to possibility to resolve the area target from the context like this

                <wm:link target="WorkEffortAgreement/delete">
                    ....
                    <wm:set-callback area-target="${useThisTarget}">
                       ...
                    </wm-setcallback>
                </wm:link>
2022-01-24 07:34:09 +01:00
Pierre Smits bbdeb09f67 Improved: Dutch labels (OFBIZ-10363)
A more complete/improved translation of labels increases the appeal of OFBiz.

Modified: CommonUiLabels.xml
improving dutch translations
2022-01-23 16:08:25 +01:00
Pierre Smits f1c9e0ef03 Improved: List and Grid (OFBIZ-11345) (#460)
* Improved: List and Grid (OFBIZ-11345)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
EntityForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
EntityScreens.xml: from form ref to grid ref , additional cleanup
EntitySyncForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
EntitySyncScreens.xml: from form ref to grid ref , additional cleanup
GeoManagementForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
GeoManagementScreens.xml: from form ref to grid ref , additional cleanup
ServiceForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
ServiceScreens.xml: from form ref to grid ref , additional cleanup
LogScreens.xml: from form ref to grid ref , additional cleanup

modified: ServiceScreens.xml
missed from form ref to grid ref in FindJobManagerLock
2022-01-21 13:36:20 +01:00
Pierre Smits 1359cf8d44 Improved: List and Grid (OFBIZ-11345) (#459)
According to the definition in widget-form.xsd the
use of a combination of a form with type="list" is
deprecated in favour of a grid.

Refactor various list forms into grids.
Refactor various list form references in screens.

modified:
- SecurityForms.xml: from form definition with list
ref to grid definition with list ref, additional clean-up
- SecurityScreens.xml: from form ref to grid ref , additional cleanup
2022-01-21 10:06:49 +01:00
Jacques Le Roux b3ae505714 Improved: Quote - Action Triggers, Permissions & ux (OFBIZ-12499)
Before sligtly modifying labels in OrderMenus.xml in PR451, here are few labels
enhancements.

Copies nl labels from CommonWorkEffort/s to WorkEffortWorkEffort/s
Removes duplicate and incomplete CommonWorkEffort/s labels in CommonUiLabels.
2022-01-20 19:53:27 +01:00
Pierre Smits 092f8f532a Improved: List and Grid (OFBIZ-11345) (#423)
According to the definition in widget-form.xsd the use of a combination of a
form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.

Modified:
SubscriptionScreens.xml: from form ref to grid ref , additional cleanup
SubscriptionForms.xml: from form definition with list ref to grid definition
with list ref, additional clean-up

jleroux: some modification after pushing previous commit from GH

In previous commit I noticed that Pierre used the CommonProduct label that I
committed for Pierre's "Adding som Dutch translations to common labels."
OFBIZ-6016

I did not notice then that there was already a more complete ProductProduct
label. I see no reason to create a new CommonProduct label. So I copied 2 lines
not present in ProductProduct from CommonProduct and removed the "nl" line that
is a duplicate of the "en" line.

With Michael we already said to Pierre that we don't like to review, before
pushing PR, not related changes mixed with what is announced by the title. It
complicates the review. I still remember being admonished by David E. Jones when
committing as a new committer doing the same. In the same David's spirit I see
no necessity to remove empty lines when it complicates the review...

Long story short, better make 2 different PR when such things is really
necessary...

I did not remove the <sub-hyperlink from communicationEventId lookup in
SubscriptionForms.xml. I checked there are 21 other cases like that in code.

Also better to remember to have lines not longer than 80 chars in commit comment.

All the rest is OK with me
2022-01-16 14:58:32 +01:00
Jacques Le Roux 8a9596be84 Improved: no functional change, labels improvements
In French, and maybe other languages, there is not only one word for new.
There are nouveau (masculine), nouvelle (féminine) and nouvel (masculine followed
by a word starting with a vowel)

Here are few related changes with existing AccountingUiLabels, HumanResUiLabel
changes and a new CommonUiLabels French labels improvements and use of
HumanResNew* labels in MainActionMenu of HumanresMenus.xml

Also alongside replaces tabs by spaces in HumanResUiLabel
2022-01-16 08:51:03 +01:00
Jacques Le Roux 952519e898 Documented: Changes "Default User Documentation website uri" (OFBIZ-12456)
Related to BuildBot migration from 0.8 to 3.2 version (INFRA-22279).
2021-12-31 10:47:02 +01:00
Jacques Le Roux 8c6d3272bd Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes random  object created and used only once in classes:
  SSLUtil
  OrderTestServices
  FinAccountHelper
  GiftCertificateServices

Also related minor formatting in HashCrypt and ContextFilter
2021-12-28 12:11:12 +01:00
Jacques Le Roux 21ebebc063 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Adds a null check at GenericMapValues::equals
2021-12-26 14:52:37 +01:00
Jacques Le Roux 06092ae0af Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
As advised by SpotBugs:

<<This code creates a java.util.Random object, uses it to generate one random
number, and then discards the Random object. This produces mediocre quality
random numbers and is inefficient. If possible, rewrite the code so that the
Random object is created once and saved, and each time a new random number is
required invoke a method on the existing Random object to obtain it.

If it is important that the generated Random numbers not be guessable, you must
not create a new Random for each random number; the values are too easily
guessable. You should strongly consider using a java.security.SecureRandom
instead (and avoid allocating a new SecureRandom for each random number needed).

Rank: Troubling (14), confidence: High
Pattern: DMI_RANDOM_USED_ONLY_ONCE
Type: DMI, Category: BAD_PRACTICE (Bad practice)>>

uses <<private static final SecureRandom SECURE_RANDOM = new SecureRandom();>>
in classes:
PaymentGatewayServices
ValueLinkApi
ContactMechServices
ProductStoreWorker
DesCrypt
HashCrypt
EntityCrypto
ContextFilter.java

Despite doing so SpotButs still reports the same error for those classes.
As it's obviously an error I prefer to not excludes those cases that will maybe
not be reported in a future version of SpotButs in Eclipse. For instance they
are not reported at all in previous version (4.5.1) but are in 4.5.2
2021-12-26 14:50:32 +01:00
Jacques Le Roux 628c251842 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
SpotBugs reports that
<<org.apache.ofbiz.base.util.collections.FlexibleServletAccessor.equals(Object)
does not check for parameter nullity

This implementation of equals(Object) does not respect the contract defined by
java.lang.Object.equals() because it does not check the nullity of the parameter
received as argument. All equals() methods must return false when they receive
a null value.>>

This fixes it, but despite SpotBugs continues to report the same error, excludes
it.

Also removes unused expandContext private var
2021-12-26 09:09:16 +01:00
Jacques Le Roux 22b8ecb557 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
Comment out the XMLRPC tests. This alone should allow Buildbot 3.2 to run the
integration tests.
2021-12-16 07:05:26 +01:00
Jacques Le Roux 3b99529c0d Improved: Address SpotBugs issue by avoiding nulls in parameter matches for JMockit Expectations (OFBIZ-11456)
Same than https://github.com/apache/ofbiz-framework/pull/411

Thanks: Daniel
2021-12-13 17:24:02 +01:00
Jacques Le Roux 4724b9e2ee Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
We don't fear collisions for "url". It's only used in testXmlRpcRequest during
a sole test, write that in exclude.xml

Also removes an unused MODULE in XmlRpcTests class
2021-12-13 16:23:54 +01:00
Daniel Watford e163330934 Improved: Address SpotBugs issue by avoiding nulls in parameter matches for JMockit Expectations (OFBIZ-11456) 2021-12-13 15:20:40 +00:00
Jacques Le Roux 36600c1bcc Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
CacheSoftReference<V> extends ReferenceCleaner.Soft<V> and implements
Serializable. But ReferenceCleaner does not implement Serializable.

I see no reasons for CacheSoftReference<V> to implement Serializable. So I
simply remove that.
2021-12-12 17:40:26 +01:00
Jacques Le Roux 4de3a37c54 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In ProposedOrder::calculateStartDate and TimeDuration::TimeDuration better use a
long directly (efficiency)

In ConfigXMLReader, removes unused getViewMap method

In ServiceArtifactInfo, some formatting and in writeServiceCallGraphEoModel
method add missing <<if (calledServiceSet != null) {>>

Adds and documents false positives in exclude.xml.
Remains 14 issues, I'll document them in the Jira and 'll later discuss them
on dev ML (committers attention needed). None of them are security issues :)
C:/projectsASF/Git/ofbiz-framework/plugins/rest-api/src/main/java/org/apache/ofbiz/ws/rs/listener/ApiContextListener.java:38 Ecriture d'un champ statique org.apache.ofbiz.ws.rs.listener.ApiContextListener.servletContext depuis la méthode d'une instance org.apache.ofbiz.ws.rs.listener.ApiContextListener.contextInitialized(ServletContextEvent) [Of Concern(15), High confidence]
C:/projectsASF/Git/ofbiz-framework/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapValues.java:49 org.apache.ofbiz.base.util.collections.GenericMapValues.equals(Object) checks for operand being a java.util.List  [Troubling(14), High confidence]
C:/projectsASF/Git/ofbiz-framework/plugins/ldap/src/main/java/org/apache/ofbiz/ldap/cas/OFBizCasAuthenticationHandler.java:91 Déréférencement immédiat du résultat d'un readLine() dans org.apache.ofbiz.ldap.cas.OFBizCasAuthenticationHandler.login(HttpServletRequest, HttpServletResponse, Element) [Of Concern(15), Normal confidence]
C:/projectsASF/Git/ofbiz-framework/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/GenericMapValues.java:49 org.apache.ofbiz.base.util.collections.GenericMapValues.equals(Object) checks for operand being a java.util.Set  [Troubling(14), High confidence]
C:/projectsASF/Git/ofbiz-framework/framework/widget/src/test/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRendererTest.java:875 Un appel de méthode dans new org.apache.ofbiz.widget.renderer.macro.MacroFormRendererTest$36(MacroFormRendererTest, ModelForm) passe null à un paramètre déréférencé de façon inconditionnelle dans org.apache.ofbiz.webapp.control.RequestHandler.makeLink(HttpServletRequest, HttpServletResponse, String) [Scary(8), Normal confidence]
C:/projectsASF/Git/ofbiz-framework/framework/widget/src/test/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRendererTest.java:848 Un appel de méthode dans new org.apache.ofbiz.widget.renderer.macro.MacroFormRendererTest$35(MacroFormRendererTest, ModelForm) passe null à un paramètre déréférencé de façon inconditionnelle dans org.apache.ofbiz.webapp.control.RequestHandler.makeLink(HttpServletRequest, HttpServletResponse, String) [Scary(8), Normal confidence]
C:/projectsASF/Git/ofbiz-framework/plugins/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java:71 Ecriture d'un champ statique org.apache.ofbiz.ecommerce.janrain.JanrainHelper.apiKey depuis la méthode d'une instance new org.apache.ofbiz.ecommerce.janrain.JanrainHelper(String, String) [Of Concern(15), High confidence]
C:/projectsASF/Git/ofbiz-framework/plugins/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractReportThread.java:160 Champ jamais écrit : org.apache.ofbiz.htmlreport.AbstractReportThread.report [Troubling(12), Normal confidence]
C:/projectsASF/Git/ofbiz-framework/plugins/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java:72 Ecriture d'un champ statique org.apache.ofbiz.ecommerce.janrain.JanrainHelper.baseUrl depuis la méthode d'une instance new org.apache.ofbiz.ecommerce.janrain.JanrainHelper(String, String) [Of Concern(15), High confidence]
C:/projectsASF/Git/ofbiz-framework/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/CacheSoftReference.java:29 org.apache.ofbiz.base.util.cache.CacheSoftReference est Serializable mais sa super-classe ne possède pas de constructeur par défaut visible [Troubling(14), High confidence]
C:/projectsASF/Git/ofbiz-framework/plugins/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java:110 Alimentation à perte d'une variable locale dans la méthode org.apache.ofbiz.ldap.activedirectory.OFBizActiveDirectoryAuthenticationHandler.getLdapSearchResult(String, String, Element, boolean) [Of Concern(15), High confidence]
C:/projectsASF/Git/ofbiz-framework/plugins/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java:95 Alimentation à perte d'une variable locale dans la méthode org.apache.ofbiz.ldap.openldap.OFBizLdapAuthenticationHandler.getLdapSearchResult(String, String, Element, boolean) [Of Concern(15), High confidence]
C:/projectsASF/Git/ofbiz-framework/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/FlexibleServletAccessor.java:193 org.apache.ofbiz.base.util.collections.FlexibleServletAccessor.equals(Object) checks for operand being a String  [Troubling(14), High confidence]
C:/projectsASF/Git/ofbiz-framework/framework/service/src/main/java/org/apache/ofbiz/service/test/XmlRpcTests.java:47 Ecriture d'un champ statique org.apache.ofbiz.service.test.XmlRpcTests.url depuis la méthode d'une instance new org.apache.ofbiz.service.test.XmlRpcTests(String) [Of Concern(15), High confidence]
2021-12-11 16:21:36 +01:00
Jacques Le Roux 8b9fc99d7d Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In ProductWorker::getProductFeaturesApplIncludeMarketingPackage fixes a possible
null dereferencement (tested too late)

In FileUtil::unZip uses a try-w-resource w/ ZipFile to close it. I crossed an
issue with automated OOTB formatting (clean-up on save in Eclipse). Fixed with
my external default editor (could not find where to change that in
OFBizJavaFormatter.xml

In ServiceArtifactInfo::calledServiceEcaSet fixes a possible null dereferencement
(tested too late), also minor formatting

In MacroScreenRenderer::renderScreenletSubWidget fixes a possible null
dereferencement (tested too late)

in FileUtil
2021-12-10 16:09:42 +01:00
Jacques Le Roux cba9471cb0 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Despite by best efforts in SecuredUpload::isValidFile and
PricatParseExcelHtmlThread::storePricatFile SpotBugs still reports possible null
dereferencements.

The error is NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE. It's false reports to me.
Hence excluding them in these places
2021-12-10 11:55:16 +01:00
Jacques Le Roux 69cff24c82 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In WebToolsServices::entityImportDir fixes a possible null dereferencement

Missed in previous commit, not sure why
2021-12-10 09:51:22 +01:00
Jacques Le Roux 54c6010c3b Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In SecuredUpload::isValidFile fixes a possible null dereferencement
2021-12-09 19:24:21 +01:00
Pierre Smits 1bbd2c2e2f Improved: Dutch UiLabels (OFBIZ-10363) (#402) 2021-12-09 18:36:05 +01:00
Jacques Le Roux 5a64c3d27d Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In exclude.xml:
removes Confidence lines, no need to complicate things
Adds 2 DC_DOUBLECHECK false reports; synchronized is used there (maybe not the
best way but it's OK as is)

In ProductConfigWrapper::equals fixes use of == instead of equals (tested)
In UspsServices::uspsPriorityMailInternationalLabel fixes 2 possible null
dereferencements

In EntityExpr::checkRhsType fixes a possible null dereferencement
2021-12-09 07:25:25 +01:00