Commit Graph
2028 Commits
Author SHA1 Message Date
Jacques Le Roux 78ee6f8792 Improved: CustomSafePolicy, also use TagBalancingHtmlStreamEventReceiver (OFBIZ-12653)
Adds <img> and <hr> to CustomSafePolicy, removes obsolete <tt>. <img> allows
only attributes src and alt.

Both <br> and <br /> are correct. For that, this rather uses
TagBalancingHtmlStreamEventReceiver

Thanks: Ingo Wolfmayr
2022-07-01 17:26:18 +02:00
Jacques Le Roux 14c58a11c8 Improved: OWASP sanitizer breaks proper rendering of HTML code (OFBIZ-12653)
Allows both <br> and <br /> to pass in UtilCodec::checkStringForHtmlSafe, both
are correct.

Clarifies owasp.properties documentation about how to create own sanitizer
policies
2022-06-21 20:57:37 +02:00
Jacques Le Roux 088b22235d Improved: Json response failed when element not serializable (OFBIZ-12621)
No functional changes, just removing a compilation warning

While compiling with Java 11 I got this message:
> Task :compileJava
UtilHttp.java:502: warning: [unchecked] unchecked call to
<R>map(Function<? super T,? extends R>) as a member of the raw type Stream
[...]

This fixes it with the help of Eclipse
2022-05-26 12:24:49 +02:00
Nicolas Malin 82f25f6192 Fixed: Json response failed when element not serializable (OFBIZ-12621)
When you forward a request-map on json response after a service call like this :

     <request-map uri="updateMyEntity">
        <security https="true" auth="true"/>
        <event type="service" invoke="serviceWithUnserializableElement"/>
        <response name="success" type="request" value="json"/>
        <response name="error" type="request" value="json"/>
    </request-map>

The request json works fine if the serviceWithUnserializableElement have an element unserializable on out put at the first level

     <service name="serviceWithUnserializableElement"...>
        <attribute name="outputStream" type="java.io.OutputStream" mode="OUT"/>
     </service>

If the definition is like this

     <service name="serviceWithUnserializableElement"...>
        <attribute name="outputStreamMap" type="Map" mode="OUT"/>
     </service>

The json failed to generate if the outputStream is a map. despite the function UtilHttp.getJSONAttributeMap that safe only the first map level and don't work in deep.

By the way, we improved the getJSONAttributeMap to work in deep by a recursive treatment on Map and List.
2022-05-25 14:35:36 +02:00
Jacopo Cappellato 1a567ed42e Improved: In UtilHttp, for regex processing of urls, replace Java regex with Google RE2J. (#512)
The Main advantage of RE2J is that it guarantees linear time execution.
2022-04-14 07:29:09 +02:00
Jacques Le Roux a3068004a1 Fixed: testInvoicePerShipmentSetFalse work with runtime configuration data (OFBIZ-12453)
UtilProperties::setPropertyValueInMemory was only based on files. Thinking by
analogy, as Pierre pushed SystemProperties with OFBIZ-6189, I thought that by
adding an UtilProperties::setPropertyValueInMemory based on
EntityUtilProperties::getProperties it would resolve the issue. But it did not.

Looking closer at the code, I wondered why UtilProperties::setPropertyValueInMemory
was used at all.

This fixes the issue by simply removing setPropertyValueInMemory and setting "Y"
or "N" when calling testInvoicePerShipment.

It though keeps the new UtilProperties::setPropertyValueInMemory variant
2022-04-06 09:31:30 +02: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 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 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 b02255ae5f Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
No functional change: removes unused MODULE in ReferenceCleaner class
2021-12-06 09:43:52 +01:00
Jacques Le Roux d4306b9f59 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
ComparableRange is a super class of DateRange that is Serializable. So
ComparableRange needs to be Serializable Too. Same with AbstractJob for PurgeJob
and GenericServiceJob
2021-12-06 09:33:31 +01:00
Jacques Le Roux aab412b948 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Renames ControlServlet class to OfbizControlServlet, because it shadowed the
simple name of it superclass
It can be exceptionally confusing, create lots of situations in which you have
to look at import statements to resolve references and creates many
opportunities to accidentally define methods that do not override methods
in their superclasses.

Same for XmlRpcClient.java
2021-12-05 13:03:50 +01:00
Jacques Le Roux 699c30ed85 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes possible null dereferencings

For FormRenderer.java it was accidentally removed for OFBIZ-12422
2021-11-30 19:03:24 +01:00
Jacques Le Roux 4d9d191dfd Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Need to check for null before return
2021-11-18 08:07:53 +01:00
Jacques Le Roux 103dd6afee Improved: no functional change
Removes useless (not used) local var
2021-11-17 16:28:24 +01:00
Jacques Le Roux 185569c8aa Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Incorrect lazy initialisation

Thanks: Spotbugs
2021-11-17 16:26:11 +01:00
Jacques Le Roux c85f60279b Improved: Remove Checkstyle warning related to double parenthesis at start of lines (OFBIZ-12340)
At https://markmail.org/message/3mhzlqew3igad3r2 I reported an issue that I was
not able to really qualify. After exchanging with a Checkstyle expert
(see markmail thread).

I was unable to find what in our checkstyle.xml file was wrongly throwing these
warnings. I decided that there was no reason to throw those warnings.

So I decided to put the SuppressionCommentFilter in our checkstyle.xml file and
use CHECKSTYLE_OFF: ALMOST_ALL/CHECKSTYLE_ON: ALMOST_ALL around
the concerned lines as documented here
https://checkstyle.sourceforge.io/config_filters.html#SuppressionCommentFilter_Examples
2021-10-17 15:38:30 +02:00
Jacques Le Roux 3cb4e791e0 Improved: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
Prevents an useless inevitable warning by commenting out
RequestWrapper::getParameterNames and with it all the unused methods in
RequestWrapper class

Also better comments CacheFilter::doFilter by giving its real and only goal:
<<to prevent a post-auth security issue described in OFBIZ-12332>>
2021-10-11 09:45:09 +02:00
Jacques Le Roux 351d752690 Improved: Refactor methods signature to reduce the number of params they use (OFBIZ-12335)
Fixes a typo about filterConfiguration in CacheFilter.java
2021-10-10 13:32:49 +02:00
Jacques Le Roux 19d2932591 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
In previous commit, in CacheFilter::doFilter, I checked "xmlrpc"  when it was
actually "/control/xmlrpc"
2021-10-10 11:24:55 +02:00
Jacques Le Roux a5bdcc6f9e Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
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
2021-10-10 08:00:51 +02:00
Nicolas Malin fcd2c0cec8 Improved: Estimated shipping cost resolution with breaks on price and quantity (OFBIZ-6988)
On the service calcShipmentCostEstimate, each estimated shipment cost is analysed to resolve which ones should be applied on the order.
During the breakQtys block analysis, OFBiz checks if the estimate match the quantity with their breaks and validates if one is good.
If a rule contains multiple break type (ex: weight and price) this will be ignored or use as partial, only one break would be analysed.

To solve it we extend the analyse on the break type combinaison.

After a global code review, we reformat the function to down less code quantity for help the reader on:
 * use an Util function to resolve BigDecimal values
 * dedicate function to resolve the shipping address
 * dedicate function to validate a break type
 * move multiple loop to stream

 Thanks to Gil Portenseigne and Jacques Leroux for their look
2021-09-15 11:45:04 +02:00
Jacques Le Roux 7a22a2bfc9 Fixed: Found a new XXE (XML External Entity Injection) vulnerability in EntityImport (OFBIZ-12304)
The XXE vulnerability can read arbitrary files on the server.

Thanks: thiscodecc for reporting this security issue (post-auth)
2021-09-13 09:28:06 +02:00
Jacques Le Roux 67665d1a9e Fixed: Found a new XXE (XML External Entity Injection) vulnerability in ArtifactInfo (OFBIZ-12306)
The XXE vulnerability can read arbitrary files on the server.

Thanks: thiscodecc for reporting this security issue (post-auth)
2021-09-13 08:10:14 +02:00
Jacques Le Roux ad1e06b9bd Improved: Update build.gradle to the latest dependencies (OFBIZ-12311)
The tests fails locally but it makes no sense, trying w/ BUilbot...
2021-09-06 10:06:41 +02:00
Jacques Le Roux 4e0ed1e6df Fixed: Static initialization vectors for encryption (OFBIZ-12281)
(after discussing this on security@ofbiz.apache.org, it was decided to open a
Jira issue for that)

I've noticed that OFBiz Framework sometimes uses static initialization vectors
(IV) while creating a cipher:

https://s.apache.org/vhlbj
https://s.apache.org/nyndk

IVs should be unique and ideally unpredictable to avoid producing the same
ciphertexts for the same plaintexts.

The issues can be fixed with something like the following:

byte[] rawIV = new byte[8];
SecureRandom random = new SecureRandom();
random.nextBytes(rawIV).
IvParameterSpec iv = new IvParameterSpec(rawIV);

jleroux: this prepends the IV in order to decrypt the plaintexts. It's similar
to what has been done for the DesCrypt class. But contrary to the DesCrypt class
I did not test.

Thanks: Artem Smotrakov
2021-07-23 09:30:25 +02:00
Jacques Le Roux 9963c46c82 Fixed: Static initialization vectors for encryption (OFBIZ-12281)
(after discussing this on security@ofbiz.apache.org, it was decided to open a
Jira issue for that)

I've noticed that OFBiz Framework sometimes uses static initialization vectors
(IV) while creating a cipher:

https://s.apache.org/vhlbj
https://s.apache.org/nyndk

IVs should be unique and ideally unpredictable to avoid producing the same
ciphertexts for the same plaintexts.

The issues can be fixed with something like the following:

byte[] rawIV = new byte[8];
SecureRandom random = new SecureRandom();
random.nextBytes(rawIV).
IvParameterSpec iv = new IvParameterSpec(rawIV);

jleroux: we prepend the IV in order to decrypt the plaintexts. I'll do
something similar in ValueLinkApi class ASAP

Thanks: Artem Smotrakov
2021-07-21 10:55:49 +02:00
Jacques Le Roux 2c421cedfb Fixed: Add http to https redirect rule for ofbiz.apache.org (OFBIZ-10590)
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
2021-07-20 07:47:32 +02:00
Jacques Le Roux e4919d16ca Fixed: IndexOutOfBoundsException on Entity Import (OFBIZ-12273)
Removes the localhost (and 127.0.0.1) OOTB.
Allows to use it through a "multi-property" (list) in security.properties.
2021-07-06 14:30:39 +02:00
Jacques Le Roux b00aed6d20 Fixed: IndexOutOfBoundsException on Entity Import (OFBIZ-12273)
My changes in OFBIZ-12249 were only to handle textareas.

The case Nicolas reported is not related to a textarea but to the special case
of KeywordSearchBox handled by KeywordSearchBox.ftl.
So this simply bypasses this special case using the "DUMMYPAGE" key then present
2021-07-05 19:36:42 +02:00
Jacques Le Roux 0effce0c7b Fixed: IndexOutOfBoundsException on Entity Import (OFBIZ-12273)
I get an IndexOutOfBoundsException when using the EntityImport.

The problem occurs while having a resemblance of an url in the data.
For example
screenPath="component://... is interpreted as url because of '://'
but doesn't match a valid url pattern.

jleroux: I decided to keep it simple and to take the "component://" and the
"https://localhost" cases apart. I see no reasons to fear "https://localhost"
there. It should be only used in a safe dev env.

Thanks: Sebastian Berg and Nicolas Malin for report
2021-07-03 19:24:08 +02:00
Jacques Le Roux cc4de50f6f Improved: fixes an indentation issue 2021-06-22 15:56:04 +02:00
Wiebke Pätzold d0924362af Fixed: Adding tel protocol in CustomPermissivePolicy is not working
(OFBIZ-12258)

With these changes, the default sanitizers rules are only loaded if
there is no CustomPermissivePolicy
2021-06-21 07:44:08 +02:00
Jacques Le Roux b9f785d2fa Fixed: Unexpected decoding of url encoded textarea data after submission (OFBIZ-12249)
Oops, forgot to commit this checkstyle issue fix
2021-06-10 09:21:05 +02:00
Jacques Le Roux 4bab66e501 Fixed: Unexpected decoding of url encoded textarea data after submission (OFBIZ-12249)
When trying to add a note to WorkEffort entity, I found that URL encoded
characters are unescaped, which is not expected.

e.g.:
1. Go to page: https://demo-trunk.ofbiz.apache.org/workeffort/control/EditWorkEffortNotes?workEffortId=TASK01
2. Add a note with content: https://example.com/a%20link
3. After submission, it will turned to be: https://example.com/a link

Thanks: Xin Wang for report and exchanges until solution I provided
2021-06-09 10:57:51 +02:00
Jacques Le Roux fb0701b7bd Fixed: Plugin not showing in menu due to permission (OFBIZ-12233)
When creating a plugin via gradle :
./gradlew createPlugin -PpluginId=plugin-test -PpluginResourceName=PluginTest
-PwebappName=plugin-test -PbasePermission=PLUGIN_TEST

and loading all the required data and permissions, the plugin doesn't appear
in the menu.

It comes from the ComponentConfig.java file, L1229, when the permissions gets
trimmed and modified. I tried removing it locally and it fixed the problem.

Thanks: Gaetan Chaboussie
2021-05-17 11:59:36 +02:00
Jacques Le Roux 7fd9d05f7e Improved: Improve ObjectInputStream denyList (OFBIZ-12221)
Forgot to change ListOfSafeObjectsForInputStream to allowList in UtilObjectTests
2021-04-07 10:12:33 +02:00
Jacques Le Roux 3f975780cf Improved: Improve ObjectInputStream denyList (OFBIZ-12221)
In SafeObjectInputStream.properties
  Renames listOfSafeObjectsForInputStream to allowList and fixes it
  Introduces a denyList

Adapts SafeObjectInputStream class to new denyList
2021-04-07 08:51:36 +02:00
Jacques Le Roux fcc0078b60 Improved: Improve ObjectInputStream denyList (OFBIZ-12221)
Prevents generics markup in string type names.
2021-04-05 17:03:12 +02:00
Jacques Le Roux 1bc8a20634 Improved: Improve UtilObject class (OFBIZ-12216)
Removes "DiskFileItem, FileItemHeadersImpl are not serializable" case. It does
not appear in trunk.

Handling with exception Rather than returning null cleans UtilObject class.

Restrict unauthorized deserialisations to java.rmi instead of java.rmi.server
2021-03-30 12:29:54 +02:00
Jacques Le Roux 4944ef8017 Fixed: Error while uploading file in Ecommerce Profile's File Manager (OFBIZ-10746)
On uploading File in Ecommerce Profile's File Manager,

"The following required parameter is missing:
[IN] [uploadPartyContentFile.partyContentTypeId]" error is displaying.

Steps to regenerate the issue:
    Open Ecommerce on Ofbiz.
    Login with any user.
    Go to Profile.
    Navigate down to File Manager.
    Select Purpose.
    Seletct Mime Type
    Click upload.

Thanks: Aishwary Shrivastava for report, Priya Sharma fir the fix
2021-02-21 19:20:00 +01:00
Jacques Le Roux b1c611bebd Fixed: Bypass Java GString to String conversion in ObjectType::simpleTypeOrObjectConvert (OFBIZ-12182)
Follows https://markmail.org/message/azn7e4g2rbpo7tvj
2021-02-19 09:28:53 +01:00
Jacques Le Roux 4be71d74c2 Improved: Update Freemarker to 2.3.31 (OFBIZ-12180)
Adds the Jira ref
2021-02-18 13:43:09 +01:00
Jacques Le Roux 44922f0fba Improved: Update Freemarker to 2.3.31 2021-02-18 13:35:53 +01:00
Michael Brohl 29bf0a040a Merge branch 'trunk' into OFBIZ-12169_Handle_remaining_checkstyle_errors 2021-02-13 11:26:01 +01:00