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
Currently the AssetMaint application is not accessible by a user with the VIEW permission, as demonstrated with userLoginId = 'auditor'.
Modfied: AssetMaintSecurityGroupDemoData.xml: added SecurityGroupPermission record
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
The request createWorkEffortPartyAssign is called after submitting the form AddWorkEffortPartyAssign, when the user wants to add a party to a project. This raise an error because it removed from workeffort component after the screen dynamising
Thanks to Pierre Smith for raise this issue and Martin Naumann for the fix 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