100 Commits
Author SHA1 Message Date
Jacques Le Roux 21860f7192 Fixed: Integration tests fail with Postgres DB (OFBIZ-12666)
This fixes testUpdateFixedAssetMaintAndWorkEffort. It works in both Derby and
Postgres

Thanks: Johannes Schreiber for report
2022-07-18 08:36:31 +02:00
Jacques Le Roux f7c583a1a1 Improved: Update build.gradle to the latest dependencies (OFBIZ-12658)
I handled <<addProperties(String,Schema) in Schema has been deprecated>>
Just needed to replace by addProperty(String,Schema) for each case
2022-06-27 15:40:17 +02:00
Jacques Le Roux 7f8ec07b53 Fixed: Update Solr and Lucene from 8.11.1 to 8.11.2 for security reason (OFBIZ-12656)
There was fixed security issues in Solr:
https://lists.apache.org/thread/wn9wkmx1ogbf00hj78y2xt3l0bo15ob9
Not in Lucene, but we need sync between them:
https://lists.apache.org/thread/olf2bhqy1ws9f0kp9nb8zs6g5dcl89l5
2022-06-22 11:46:47 +02:00
Jacques Le Roux 67cbf35e83 Improved: Sorl external logging is not working, but a bit in console (OFBIZ-12646)
After removing useless system properties used to handle logging in
OFBizSolrContextFilter.java with commit 102eb51153
that had a wrong commit title
<<Improved: Unable to upload a file through ecommerce (OFBIZ 12636)>>
and message that should have been:
<<Remove useless system properties used to handle logging. Maybe previously this
was working but it was then long ago.

Also speeds things a bit while loading Solr by using the not so obvious
SOLRHOME_ATTRIBUTE servlet attribute rather than the "solr/home" system property

Note: this is a 1st cleaning step and we are still missing external logging>>

I forgot to remove the related properties in solrconfig.properties, this does it
2022-06-17 17:34:55 +02:00
Jacques Le Roux 102eb51153 Improved: Unable to upload a file through ecommerce (OFBIZ-12636)
Allows to check for only CSV files. This is not used OOTB in OFBiz.

Thanks: Sachin for report and confirmation it's OK
2022-06-16 16:48:43 +02:00
Jacques Le Roux e18d5768ac Improved: Ecommerce Error Page Does Not Work (OFBIZ-4390)
Currently when an error occures in ecommerce or ecomseo CsrfUtil::checkToken
throws the RequestHandlerException "Invalid or missing CSRF token for AJAX call..."

It's only disturbing in log for no benefit. This feature seems obsolete and
we should rather get rids of it.

I don't backport in case I'd proved wrong
2022-06-11 14:43:08 +02:00
Jacques Le Roux f8cb563d18 Improved: Screen projectmgr main is taking long time to load when projects are more (OFBIZ-12606)
When projects are more than 1000, main screen of projectmgr component is taking
very long time  to load.
Currently it is loading all available projects in one shot and there is
"ProjectIsBillable.groovy" which is calling in row-actions

Solution : We can use performFind service  to increase performance in this screen

jleroux: I have just removed the commented out replaced code and changed the new
<field name="createdStamp"
by
<field name="createdDate" map-name="resultProject.projectInfo"
Also automatically removed few trailing blanks

Thanks: Balaji Yendamuri for the patch
2022-05-03 11:58:22 +02:00
Jacques Le Roux eac1fb508f Improved: projectView doesn't show the newly created project after creation ( (OFBIZ-12601)
"Previously" the project creation directly lead to the ProjectView screen within
the context of the newly created project. In this way users were able to
directly add e.g. resources to the newly created project without selecting it
again within the FindProject screen. Within the patch provided I just copied the
success handling from the updateProject request mapping which seems to restore
the initial functionality again.

jleroux: Even if I don't know to what to compare in past, I indeed see no
reasons to not do so.

Thanks: Sixty One for the patch
2022-04-20 09:36:20 +02:00
Jacques Le Roux 2ddb605ae8 Fixed: Solr requires application/x-www-form-urlencoded (OFBIZ-12600)
Solr plugin fires exception on create/update of a product.

1.) enable eca in solrconfig.properties: solr.eca.enabled=true
2.)  enable all eca in eecas.xml
3.) start ofbiz
4.) update or create a product (go to product and save it)
the error is fired.

Thanks: Ingo Wolfmayr for report
2022-04-14 15:44:14 +02:00
Jacques Le Roux 5792f452a9 Fixed: Test run was unsuccessful because of failing solr tests (OFBIZ-12595)
The previous commit for OFBIZ-12594 was only working on Windows. On *nix OSs
there is no way to reliably get "--test" String from java.class.path property.

Also the previous fix was brittle because relying only on 1 space separating
words.

This fix puts in the SolrDispatchFilter system property at the beginning of the
4 Solr tests and removes it at end of them. That presence can reliably be tested
in ControlFilter that is called before SolrDispatchFilter. It allows to bypass
SecurityUtil::containsFreemarkerInterpolation that would else change the
parameters content type that must be application/x-www-form-urlencoded.
content

Thanks: Tom Pietsch for report and Mart Naum for confirmation
2022-04-13 14:38:15 +02:00
Jacques Le Roux 4cce082e93 Improved: no functional change, adds GitHub Actions build status emails.
As the name suggests, these are emails that notify of either a failed build
using GitHub Actions, or a change from failure in previous builds to a
successful build. Continuously successful builds will not trigger emails, as
that could be rather spammy.

Please see the documentation on this at: https://s.apache.org/asfyaml-gha
2022-04-02 13:13:22 +02:00
Jacques Le Roux 265cc7f83e Improved: Remove deprecation warning by removing direct call to Class::newInstance
Class.newInstance() has a flaw, in which any Throwable from the constructor is
thrown unchecked. It was deprecated in Java 9, but not marked for removal.
It shows as a deprecation warning when compiling OfBiz with Java 11.

Thanks: Heinz Kabutz for reporting and initially committing 0e6732b. This
completes in plugins and all will we backported
2022-04-01 10:41:55 +02:00
Jacques Le Roux daa5f74b42 Improved: no functional change, adds GitHub Actions build status emails.
As the name suggests, these are emails that notify of either a failed build
using GitHub Actions, or a change from failure in previous builds to a
successful build. Continuously successful builds will not trigger emails, as
that could be rather spammy.

Please see the documentation on this at: https://s.apache.org/asfyaml-gha
2022-03-29 13:43:19 +02:00
Jacques Le Roux a7bb363932 Improved: no functional change, removes misleading comment
The Base64 class no longer exists
2022-03-05 11:04:41 +01:00
Jacques Le Roux 0da1f22334 Improved: no functional change simple formatting 2022-02-28 18:27:30 +01:00
Jacques Le Roux 20ce270211 Improved: no functional change, removes commented out request-maps since 2009
See https://markmail.org/message/upeivoflev5de3ke
2022-02-24 09:28:20 +01:00
Jacques Le Roux 9d66988c5b Fixed: placeholder text has been implemented but seems to do nothing (OFBIZ-12548)
Adding this to a form in a widget/somethingForms.xml file:

<field name="description" title="${uiLabelMap.CommonDescription}"
required-field="true"><text placeholder="This is placeholder text"/></field>

Does not throw a error, but when the form is displayed, no placeholder text
appears.  I've checked the html code in the browser to confirm that it wasn't
white placeholder text on a white background, and it does not define the
placeholder property in the generated html.

Are there any cases where placeholder text does work?  If so, it would be nice
if a working example could be added somewhere (like someone in ofbiz,
or maybe in the "example" plugin)

Thanks: ddev for report and spotting the missed commit of
OFBIZ-5341-Example.patch in OFBIZ-5341
2022-02-01 08:48:08 +01:00
Jacques Le Roux 35af177893 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in LICENSE file) to test the RAT Buildbot
config
2021-12-31 19:44:47 +01:00
Jacques Le Roux 9d491ca801 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (remove a space in LICENSE file) to test the RAT Buildbot
config
2021-12-31 16:32:43 +01:00
Jacques Le Roux 02b243eede Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in LICENSE file) to test a change in new
Buildbot config

Incremental changes are really necessary and it's a pain (no syntax checker) :/
2021-12-28 17:03:06 +01:00
Jacques Le Roux a5b5e5055f Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (removes a space in LICENSE file) to test a change in new
Buildbot config
2021-12-28 12:51:33 +01:00
Jacques Le Roux 7e4dc9a353 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes a typo automatically put in by
https://github.com/apache/ofbiz-tools/blob/master/wiki-files/OFBizJavaFormatter.xml
I have not the guts to change that :/ Maybe later...
2021-12-28 11:42:33 +01:00
Jacques Le Roux b3a0b8344c Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In GitHubEvents::gitHubRedirect and LinkedInEvents::linkedInRedirect  random
object created and used only once.

Fixes a typo for MESSAGE_LABLES

Adds a FIXME in OFBizCasAuthenticationHandler::OFBizCasAuthenticationHandler.
It's only an "empty" constructor supposed to "initializes some required member
variables". I see nothing happening here and it's never called, remove it?
2021-12-28 09:42:32 +01:00
Jacques Le Roux 424b238582 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in LICENSE file) to test a change in new
Buildbot config
2021-12-27 15:46:47 +01:00
Jacques Le Roux 82c5a574fb Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
I wrote in previous commit:
"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"

Actually it turn out to be that I needed to remove the SpotBugs markers.
SpotBugs is mischievous. Sometimes just when fixing a report in a file it
automatically updates the tree of reports, most of the time not. Sometimes you
don't need to remove the SpotBugs markers. Just running again clears the tree of
reports.

Anyway I was inspired to not exclude the reported cases for the classes above.
They no longer appear, but a new one popped up (or I missed it previously but
I doubt) in SampleHtmlThread::run.

This fixes it and it no longer appears when just running SpotBugs again,
go figure...
2021-12-26 15:26:33 +01:00
Jacques Le Roux ac6acf03a3 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Random object created and used only once in
OFBizCasAuthenticationHandler.rand(int, int)
SampleHtmlThread.run()

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)
2021-12-26 13:32:04 +01:00
Jacques Le Roux efb113250d Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In ReportEncoder::createString == should not be used but equals should
2021-12-26 13:23:49 +01:00
Jacques Le Roux 57ef5c81d3 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Before analysing issues with apiKey and baseUrl static vars, just better formatting
More to test a change in Buildbot config actually
2021-12-24 11:32:16 +01:00
Jacques Le Roux 537a4591e2 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
We don't fear collisions for "servletContext". It's only initialised by
contextInitialized() and then only read before being destroyed by
contextDestroyed()

Also initialises servletContextto null
2021-12-23 17:13:54 +01:00
Jacques Le Roux 1eeb4026e6 Improved: fixes an indentation 2021-12-22 09:19:12 +01:00
Jacques Le Roux 921fee3c0c Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In OFBizActiveDirectoryAuthenticationHandler class, fixes a possible NPE:

Immediate dereferencement of the result of readLine()
(NP_IMMEDIATE_DEREFERENCE_OF_READLINE)

The result of invoking readLine() is immediately dereferenced. If there are no
more lines of text to read, readLine() will return null and dereferencing that
will generate a null pointer exception.
2021-12-21 14:19:40 +01:00
Jacques Le Roux 55c7d157f5 Fixed: Update Solr and Lucene to address several CVEs (including Log4j) (OFBIZ-12464)
Solr and Lucene 8.11.1 are now available in Maven Central
2021-12-18 17:01:56 +01:00
Jacques Le Roux c5539184e0 Improved: no functional change, just fix 2 JavaDoc (no real pb just syntax) 2021-12-18 11:47:13 +01:00
Jacques Le Roux a02c8ba350 Fixed: Update Solr and Lucene to address several CVEs (including Log4j) (OFBIZ-12464)
Solr is not yet available on Maven :/

We will also need to update Tika, and I guess the list will continue...
2021-12-17 05:14:19 +01:00
Jacques Le Roux 4f26a91aec Fixed: Update Solr and Lucene to address several CVEs (including Log4j) (OFBIZ-12464)
See SOLR-15843 and
https://solr.apache.org/guide/8_11/solr-upgrade-notes.html
https://solr.apache.org/docs/8_11_1/changes/Changes.html#v8.11.1.bug_fixes

Also fixes luceneMatchVersion in solrconfig.xml, was forgotten last times
And clarifies comments about that
2021-12-16 17:18:14 +01:00
Jacques Le Roux 8d4aebb836 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In OFBizActiveDirectoryAuthenticationHandler class, removes the feeding of an unused
var ctx

In OFBizLdapAuthenticationHandler class, removes the feeding of an unused var ctx

In AbstractReportThread class, fixes few typos
2021-12-16 17:08:38 +01:00
Jacques Le Roux 5a69c225af Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Simple JavaDoc formatting in AbstractReportThread

Fixes 3 REC_CATCH_EXCEPTION bugs in EbayOrderServices and 1 in
ImportOrdersFromEbay, ie:
<<This method uses a block try-catch that catches
Exception objects, but Exception is never fired in this block, and
RuntimeException is not explicitly intercepted.
It is a common mistake to say that
try / catch (Exception e) is the same as many
try / catch, but this twist also intercepts
RuntimeException, hiding potential bugs.>>

Also some formatting and useless comments removed in both classes.
2021-12-11 15:39:03 +01:00
Jacques Le Roux 576d5534a2 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In AbstractPricatParser::writeCommentsToFile fixes a possible null
dereferencement
Fixes 2 JavaDoc issues
2021-12-10 10:26:42 +01:00
Jacques Le Roux 7b78e25f31 Improved: better JavaDoc 2021-12-10 08:49:12 +01:00
Jacques Le Roux 21c9f0fda9 Improved: add a log error message in AbstractPricatParser::getCellContents
When there are no cells to get content from
2021-12-10 08:11:58 +01:00
Jacques Le Roux b5cad1d5e1 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In PricatParseExcelHtmlThread::storePricatFile try to fixes a possible null
dereferencement but does not work (weird).
The error is NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

In OpenApiUtil::getSchemaForEntity fixes a possible null dereferencement
2021-12-09 11:59:29 +01:00
Jacques Le Roux 1f0cca7fa4 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Renames BirtEngineServlet class to OfbizBirtEngineServlet, 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.

Also remove trailing spaces in OpenApiUtil class
2021-12-05 12:59:59 +01:00
Jacques Le Roux cf086a2b47 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
In GitHubEvents::gitHubRedirect, random object created and used only once.

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.
Also fixes 2 Javadoc errors

In SampleHtmlThread, uses SecureRandom rather than Random class

In LinkedInEvents::linkedInRedirect, uses SecureRandom rather than Random class
Also fixes 2 Javadoc errors
2021-12-05 09:55:08 +01:00
Jacques Le Roux 923b42c2da Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes possible null dereferencings in
EbayHelper::createPayment,
AbstractPricatParser::writeCommentsToFile
SolrProductSearch::getSideDeepCategories
WebPosEvents::getProductType
2021-12-05 09:55:08 +01:00
Jacques Le Roux 51501fe7e3 Improved: Upgrade Solr and Lucene to 8.11 (OFBIZ-12388)
https://solr.apache.org/docs/8_11_0/changes/Changes.html
2021-11-17 19:08:18 +01:00
Jacques Le Roux 002bb61b6e Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Return with post increment does not work, pre increment does

Thanks: Spotbugs
2021-11-17 08:16:14 +01:00
Jacques Le Roux 97fe0058a8 Fixed: Use NPM with gradle to get external JS dependencies (OFBIZ-11960)
additional-methods.min.js was missing, forgot previously

Unrelated to plugins, but I also tried to use jquery-ui-dist from node
https://www.npmjs.com/package/jquery-ui-dist despite I knew it was less secure
https://www.cvedetails.com/vulnerability-list/vendor_id-6538/product_id-31126/Jquery-Jquery-Ui.html
But it missed at least the lookup icon in Helveticus.

I'll check later when https://www.npmjs.com/package/jquery-ui-dist will provide
a more secure version.

Also in ecommerceI found this error in js console: : "$.timepicker is undefined"
I did not find the reason. Anyway it seems not used in ecommerce.
2021-11-11 11:26:02 +01:00
Jacques Le Roux b542a38b18 Reverted: work related to PartyRole handling initiated with (OFBIZ-5980)
Currently OFBiz is broken and hard to fix. You can't even create an order !

Revert "Improved: visibility of expire button (OFBIZ-12362) (#331)"
This reverts commit e3b125ef4cb4247233097f3e00f28b10773d708c.

Revert "(OFBIZ-5980) Improvement: PartyRole record(s) expiration/revocation (#330)"
This reverts commit a8ab2be55a96a1aeccc4c07887ebbb4d25b2cc28.

Revert "Improved: seed data (OFBIZ-12355) (#328)"
This reverts commit b204b867b40787dbcc5a17a30c1d22ade1a422cc.

Revert "Reverted: Have the ability to revoke (expire) roles of a party (OFBIZ-5980)"
This reverts commit 85e066deb358404b4681c148ba0d296e481bf666.

Revert "Reverted: damn I did not revert the right push :/"
This reverts commit b867b2a89fe36bb7e02b24814b2fb2fc2683f1c4.

Revert "(OFBIZ-5980) Improvement: PartyRole record(s) expiration/revocation (#325)"
This reverts commit 8ed2252df82be226d99d97250c659a1f8e3211fe.

Revert "Reverted: Have the ability to revoke (expire) roles of a party (OFBIZ-5980)"
This reverts commit 5b5e03f71b6f94ca3c4a1a1526681634835527a5.

Revert "Improved: Have the ability to revoke (expire) roles of a party (OFBIZ-5980)"
This reverts commit 46f7ee91d3355b3e10a5b2732797591c748a27dd.

Revert "Improved: seed data (OFBIZ-12353) (#324)"
This reverts commit fade92bb57d23333dd648bbab456c23cdb517787.
2021-11-08 20:42:03 +01:00
Jacques Le Roux 7ab9d05412 Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Fixes wrong methods names in EntityFunction class
Forgot the plugins while working on smthg else :/
2021-10-17 11:42:38 +02:00
Jacques Le Roux a6364a8afa Improved: Remove Docbook parts now useless since Ascidoc is used for online help (OFBIZ-12327)
At https://markmail.org/message/inoihmcon37wq5zz I suggested:

If I'm not wrong, we no longer use Docbook anywhere. So I suggest to remove it
from:

1. cmssite component, where it was used by the online help, now assured by
    Asciidoc. BTW, for whom it could concern, I noticed that anchors jumping
    in adoc files does not work in online help
2. docbook.dtd in content component only used by the cmssite component
3. docbook.css in themes, I'm not sure that still useful there
2021-09-25 10:32:53 +02:00
Jacques Le Roux 48156518c9 Improved: Adds the HTML <input> accept Attribute in form widgets and Freemaker templates (OFBIZ-12049)
Removes unused OOTB TextImage.ftl
Explain the script in ViewProfile.ftl
"Accepts" CSV files in SamplePricat.ftl
2021-09-21 17:47:20 +02:00
Jacques Le Roux ff03ec248a Fixed: The Solr version included in OFBiz has an SSRF vulnerability (CVE-2021-27905) (OFBIZ-12316)
This post-auth security issue was reported to the security team by weinull orz
<weinull@outlook.com> As he suggested the solution is to update Solr to its last
version (8.9.0)

This solution contains a (justified) rant!

Thanks: weinull orz
2021-09-15 10:20:45 +02:00
Jacques Le Roux 9d4c9fcaff 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:05:40 +02:00
Jacques Le Roux 30ec649c57 Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Fixes last bugs
2021-08-06 18:29:43 +02:00
Jacques Le Roux 229b9b9ca1 Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Another fake change in .sonarcloud.properties to test setting changes in
GitHub sonarQBE UI
2021-08-06 18:22:16 +02:00
Jacques Le Roux 874c830fbb Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Fixes few bugs
2021-08-06 18:16:41 +02:00
Jacques Le Roux eee69f91c5 Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Fixes a possible http issue (not a big deal)
2021-08-06 17:47:21 +02:00
Jacques Le Roux 4f4328bf61 Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Another fake change in .sonarcloud.properties to test setting changes in
GitHub sonarQBE UI
2021-08-06 17:16:45 +02:00
Jacques Le Roux 0606714363 Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Another fake change in .sonarcloud.properties to test setting changes in
GitHub sonarQBE UI
2021-08-06 17:11:33 +02:00
Jacques Le Roux 69eea73ba2 Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Fake change in .sonarcloud.properties to test setting changes in sonarQBE
following
https://sonarcloud.io/documentation/advanced-setup/analysis-scope/
and
https://sonarcloud.io/project/settings?category=exclusions&id=apache_ofbiz-plugins

1st step, maybe others will be needed...
2021-08-06 17:04:14 +02:00
Jacques Le Roux 190e816364 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:25 +02:00
Jacques Le Roux 6106277bb4 Improved: Add global web.xml to simplify session timeout configuration (OFBIZ-12255)
Currently, session timeout is configured in apps separately, but session is
shared globally, so the smallest one take effects, and it will not take effect
separately for different apps.

Then it is both inconvenient and confusing to increase session timeout value,
as all values in those files need to be updated.

A global web.xml is needed, to simplify session timeout configuration.

Thanks: Xin Wang
2021-06-22 08:52:44 +02:00
Jacques Le Roux af63249c4e Improved: removes mention of Birt in plugins LICENSE file
We no longer embed files from Birt project. For years now we use Gradle to load
org.eclipse.birt.runtime:viewservlets:4.5.0 that is only "loaded at runtime"
2021-06-17 18:34:26 +02:00
Jacques Le Roux e51dccb9bb Fixed: Empty field is reflecting on Contact list section on Profile Page (OFBIZ-10386)
Steps to generate:

Open https://demo-trunk.ofbiz.apache.org/ecomseo/viewprofile

On the profile page, Go down to Contact list
Empty fields are displaying before Verify Subscription button

Expected: The field should have some specifications to be filled up

Thanks: Archana Asthana for report, Devanshu Vyas for suggestion, Praveen Patil
for patch and Thirumurugan for confirming
2021-05-29 15:47:21 +02:00
Jacques Le Roux 88152045de Improved: Adds swagger-ui in LICENSE file 2021-05-15 23:50:23 +02:00
Jacques Le Roux dbfa4f0ca0 Improved: Handle remaining checkstyle errors (OFBIZ-12169)
This handles the "'(' should be on the previous line?" rule of MethodParamPad

Actually not completely, because there are still some cases that can't be
handled by changing code, notably when a casting is necessary. I believe there
is an error in checkstyle code. I'll discuss that in dev ML before sending
checkstyle team a report.
2021-05-04 10:35:12 +02:00
Jacques Le Roux a3438121d8 Improved: Comment out the SOAP and HTTP engines (OFBIZ-12212)
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 and scrumm controllers, it should be
enough.

The tests pass
2021-03-29 13:29:58 +02:00
Jacques Le Roux cf1cb40479 Documented: fixes ldap documentation
It was no up to date, only in R16 the plugins was not enabled

Only trunk as so far AsciiDoc documentation
2021-03-11 10:41:26 +01:00
Jacques Le Roux 3ade20a4f8 Improved: Add JAX-RS capabilities (Jersey)
The real name of ofbiz is OFBiz. This renames it in descriptions.
It also renames the webapp title from Ofbiz-rest-jersey to Rest-jersey.
We know it's in OFBiz.
2021-03-01 11:23:48 +01:00
Jacques Le Roux 35a2eca9b4 Fixed: Exception error on ecommerce portal while trying to register new user
(OFBIZ-)

Missing import statement in the groovy script on the new customer registration
page.

Thanks: Pradeep Choudhary
2021-02-27 14:08:42 +01:00
Jacques Le Roux 2b6da24f7e 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:05 +01:00
Jacques Le Roux e964d61724 Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
This 1st step sorts the plugins. We need to discuss more...
2021-02-14 21:12:52 +01:00
Jacques Le Roux f9069945ad Improved: Rename some connoted words like blacklist and whitelist (OFBIZ-12168)
Renames respectively blacklist and whitelist to denylist and allowlist in
several places.

Renames masters and slaves to mains and replicas in solrconfig.xml inherited
from the Apache Solr version we use. The slave word is still used at
https://cwiki.apache.org/confluence/display/solr/SolrConfigXml referenced from
solrconfig.xml

There are still a lot of master word which can be replaced by main, but not in
contexts where slave is also used. I'll discuss that on dev ML again...
2021-02-09 09:55:43 +01:00
Jacques Le Roux 7bdbaa338b Fixed: Issue: Displaying company and product information at product backlog, subcomponent of Scrum Application
(OFBIZ-)

Steps to regenerate:
    Navigate to Applications
    Scrum
    Click on '+ Add product'
    Enter: Company and Product Owner
    Product Name
    Description

Issue: the information given in 4, 5, 6 steps are not displayed at the
Product backlog (view product) screen.

Thanks: Dikpal Kanungo for report and Anushi Gupta for the fix
2020-12-28 11:53:42 +01:00
Jacques Le Roux 78bc570ac8 Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
This reverts commit 17eb2e4cf7bfba4e6a6b62117aa8d64cd5774c5e.

It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!

Thanks: James for report
2020-12-18 11:04:16 +01:00
Jacques Le Roux 40d7c57662 Improved: Update build.gradle to the latest dependencies (OFBIZ-12092)
I crossed new issues with plugins:

I tried to update Solr and Lucene to 8.7.0 but crossed issues (compilation and
Eclipse classpath)

Same for Jersey with 3.0.0 version
2020-12-17 18:44:33 +01:00
Jacques Le Roux 4d34c9d43f Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)
Same for sub-hyperlink, forgot the plugins with 17eb2e4cf7bfba4e6a6b62117aa8d64cd5774c5e
2020-12-15 09:16:40 +01:00
Jacques Le Roux 4bf7288f24 Improved: use a label for "uploadedFile" in form widgets
ie
<field name="uploadedFile" title="${uiLabelMap.ContentFile}">
instead of only
<field name="uploadedFile">
2020-12-08 17:17:52 +01:00
Jacques Le Roux e84c7ada87 Fixed: Lucene TopScoreDocCollector::create wrong call the 2 in Search.groovy scripts (OFBIZ-12087)
I guess it's due to an update of Lucene, easy fix
2020-12-07 13:20:18 +01:00
Jacques Le Roux 0718b63544 * Fixed: Secure the uploads (OFBIZ-12080)
2020/08/10 the OFBiz security team received a security report by Harshit Shukla
<harshit.shukz@gmail.com>, roughly it was (quoting part of it to simplify):

<<I have identified a Remote Code Execution (RCE) Vulnerability. The reason
behind this RCE is lack of file extension check at
catalog/control/UploadCategoryImage?productCategoryId=CATALOG1_BEST_SELL&pload_file_type=category>>

Using this post-auth RCE in OFBiz demos, Harshit was able to get some AWS
credentials by uploading a webshell (based on [0]).
By security, it was then decided by the Infra and OFBiz security teams to shut
down the demos.

After discussing the elements reported with Mark J Cox (VP of ASF security team)
we in common decided that no CVE was necessary.
2020-12-01 08:49:25 +01:00
Jacques Le Roux 7276348269 Fixed: Wrong quote marks (OFBIZ-11972)
Thanks: Alex Bodnaru
2020-10-06 16:01:18 +02:00
Jacques Le Roux 77b9733cf6 Improved: Redundant line in themes (OFBIZ-OFBIZ-11997)
Removes the duplicated line in ecommerce theme and format correctly in multiflex

Thanks: Alex Bodnaru for report
2020-10-06 12:26:13 +02:00
Jacques Le Roux 908db34449 Fixed: Flexible reports use an old noNamespaceSchemaLocation (OFBIZ-12039)
While working on using flexible reports during this discussion
(https://markmail.org/message/qgebmemkqb6ddgzw)
I found this kind of errors in log:

XmlFileLoader: File Internal Content process error. Line: 20. Error message:
TargetNamespace.2: Expecting no namespace, but the schema document has a target
 namespace of 'http://ofbiz.apache.org/Widget-Form'.

Turned out that it was due to an old use of noNamespaceSchemaLocation when
dynamically creating forms.

The fix is to use the same definition than in current forms.

Thanks: Georg Potthast for starting the discussion
2020-10-04 11:26:27 +02:00
Jacques Le Roux 180ddef270 Fixed: Complete Birt Flexible Reports documentation (OFBIZ-9188)
Removes "NOTE: This feature will begin to be officially available with the
R17.12 branch first release"
2020-10-03 11:09:46 +02:00
Jacques Le Roux 6c9c0d6e36 Fixed: Javadoc issues (OFBIZ-11328) 2020-10-01 23:03:54 +02:00
Jacques Le Roux 8ced392fde Fixes few JavaDoc issues 2020-09-24 11:00:45 +02:00
Jacques Le Roux a4fb6d22ee Fixed: Add support to read and register resources defined in XML DSL(OFBIZ-11995)
Fixes a JavaDoc issue and while at it replaces
  // TODO Auto-generated catch block
  e.printStackTrace();
by
  Debug.logError(e, MODULE);
2020-09-24 06:59:30 +02:00
Jacques Le Roux 6ac7dc934a Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
We have a lot of "do nothing" in Java code. In case of catch we should at least
have Debug.logError(e, MODULE); and maybe an explanation in the comment.
2020-09-15 15:25:08 +02:00
Jacques Le Roux b1c98eee47 Improved: display/selection of unit of measure is broken/plugins (OFBIZ-11993)
Better code

Thanks: Alex
2020-09-14 07:57:26 +02:00
Jacques Le Roux bf60a20d9d Fixed: display/selection of unit of measure is broken/plugins (OFBIZ-11993)
Allows selection of uom for multiple products on the same web page

Thanks: Alex
2020-08-31 10:08:37 +02:00
Jacques Le Roux 9892828d56 Fixed: multiflex css is linking to wrong location (OFBIZ-11977)
Thanks: Alex
2020-08-30 11:18:38 +02:00
Jacques Le Roux b049b93b55 Improved: Update information in README.md files from removed pages in wiki 2020-08-29 17:37:33 +02:00
Jacques Le Roux b9a3be3e1e Reverted: "Improved: Have a readme in every component (OFBIZ-6243)"
This reverts commit 598cf6c27d.

An Apache URL is much easier to have (NO bad idea, does not show like the
camo.githubusercontent.com link does, cache control issue on ASF servers?)
2020-08-29 13:53:36 +02:00
Jacques Le Roux 598cf6c27d Improved: Have a readme in every component (OFBIZ-6243)
An Apache URL is much easier to have
2020-08-29 13:48:57 +02:00
Jacques Le Roux 9bf5e044f7 Improved: Have a readme in every component (OFBIZ-6243)
Not sure why we have this problem (according to
https://docs.github.com/en/github/authenticating-to-github/about-anonymized-image-urls
could be to missing cache control in our site server)

As I was fed up not viewing the OFBIz logo anywhere, and mostly in GH,
but just in browser at https://ofbiz.apache.org/images/ofbiz_logo.png
and I noticed I was viewing it well locally at
https://github.com/apache/ofbiz-framework/tree/trunk/themes/rainbowstone
so decided to use this URL everywhere rather!
2020-08-29 13:36:23 +02:00
Jacques Le Roux 7d140f3e27 Improved: Have a readme in every component (OFBIZ-6243)
This preludes the move of content of README.md files into the asciidoc
documentation

Updates the link to OFBiz-logo.png (also in ReportDesignGenerator.java)
Removes deprecated information related to Svn, Jira and Confluence
We will move the wiki pages to wiki attic with OFBIZ-11619
2020-08-29 11:52:35 +02:00
Jacques Le Roux c8d22ed72a Improved: Checkstyle: Variable name must match pattern (OFBIZ-11926)
All final data members of the class must match this naming pattern
'^[A-Z][A-Z0-9](_[A-Z0-9]+)$'

I added the changes in CommonScreens.xml but forgot to push this one in ecommerce
2020-08-28 09:38:31 +02:00
Jacques Le Roux 031a16026d Improved: enclose productsummary list in div.row to better use the screen/plugins (OFBIZ-11979)
It's not about div.row only, in productdetail, the reason field was outside the
summary box.

I've moved the reason inside the summary box, as a generic parameter, highlightLabel.

Thanks: Alex Bodnaru
2020-08-25 09:04:23 +02:00
Jacques Le Roux ba565306ad Improved: removes a duplicated price for PEPPERS-G
PriceServices |I| There is more than one DEFAULT_PRICE with the currencyUomId
USD and productId PEPPERS-G, using the latest found with price: 1.000
2020-08-24 18:22:44 +02:00
Jacques Le Roux 809d2ce300 Improved: bootstrap-bundle*.js contains bootstrap*.js (OFBIZ-11969)
Non-bundle is redundant, with performance hit.

I also replaced in multiflex theme

Thanks: Alex Bodnaru
2020-08-22 11:08:59 +02:00