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
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
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
"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
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
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
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
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
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
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
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) :/
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...
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?
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...
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)
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
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.
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
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.
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
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
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
Fixes possible null dereferencings in
EbayHelper::createPayment,
AbstractPricatParser::writeCommentsToFile
SolrProductSearch::getSideDeepCategories
WebPosEvents::getProductType
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.
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
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
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...
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
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
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"
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
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.
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
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.
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
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...
(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
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
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/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.
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
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.
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?)
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
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
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