Commit Graph
230 Commits
Author SHA1 Message Date
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 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 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
Deepak Dixit 73876cdb14 Removed HelpData file entries from ofbiz-component.xml (#54) 2021-02-12 12:46:59 +05:30
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
holivier eebd368718 Documented: migration to help system using asciidoc files (OFBIZ-11587)
Remove all related help docbook files
2020-10-26 16:06:44 +01:00
holivier 36601854f2 fixed: asciidoc attribute imagesDir should not be in the header 2020-10-06 13:54:18 +02:00
holivier c8f0123845 fixed: title-logo-image should be in header so without blank line
Now OFBiz-Logo is print in pdf
2020-10-05 12:44:11 +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
holivier 70180cf254 Improved: change asciidoc Image directory convention for plugins (OFBIZ-12035)
* for birt component,
    * move all images to images/birt directory
    * change in birt.adoc imagesdir to ./images/birt
2020-10-02 16:55:46 +02:00
holivier 66070a6bc1 Documented: ofbiz-plugins / Example, migration of docbook help files
to asciidoc
(OFBIZ-11587)

example.adoc and example_main.adoc created
Help link now point to the html file generated from the asciidoc files

In the global Help Docbook index tree, change Example help page to a
short page with a link to the new help

Remove docbook help files for example
HELP_EXAMPLE_docbook.xml has not been migrate because it's replace by
the existing documentation_guidelines.adoc
2020-09-24 18:09:10 +02:00
Suraj Khurana f21eda4542 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in plugins component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 11:57:19 +05:30
Suraj Khurana 26ddcc0c8e Improved: Corrected line is longer than 150 characters checkstyle issues in plugins component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:27:09 +05:30
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
Suraj Khurana 1207d24062 Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in plugins component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements.
Thanks jacques for finalizing Javadoc pattern during this effort.
2020-08-22 13:22:19 +05:30
Suraj Khurana 403fc39d7f Improved: Added missing Javadocs for some methods, this is required for all classes which looks like designed for extension (can be subclassed).
(OFBIZ-11947)
This is done for plugins component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
2020-08-17 12:29:08 +05:30
Priya SharmaandPriya Sharma 01e2e16681 Improved: Move 'SecurityPermission' data to seed data files (OFBIZ-10575) (#38)
Co-authored-by: Priya Sharma <priya.sharma@hotwaxsystems.com>
2020-08-11 16:01:46 +02:00
Suraj Khurana b65d9c94df Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-plugins into trunk 2020-08-03 10:08:06 +05:30
Suraj Khurana 30f796146c Improved: Corrected some line is longer than 150 characters checkstyle issues. Also fixed some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
2020-08-03 10:07:16 +05:30
Pawan Verma b7ef54d494 Improved: Inconsistent String Comparisons(OFBIZ-9254)
There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.

Thanks: Devanshu for your contribution.
2020-07-30 17:02:52 +05:30
Suraj Khurana 743c627f40 Improved: Corrected all incorrect indentation level issues in plugins component, also fixed some case indentation checkstyle issues.
(OFBIZ-11922)
2020-07-26 21:07:45 +05:30
Suraj Khurana 51cb1d7958 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-plugins into trunk 2020-07-21 12:29:01 +05:30
Suraj Khurana 22ccc6801f Improved: Corrected some single line statements to fix checkstyle issues, also removed some remaining extra spaces from code to avoid checkstyle erros in plugins component.
(OFBIZ-11886)
2020-07-21 12:28:45 +05:30
Jacques Le Roux a0f7e77e77 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:23 +02:00
holivier cb082af513 Documented: migrate help link to asciidoc user manual for Plugin
BIRT (OFBIZ-11587)

All files have been migrated to asciidoc format and help link now point
to the html file generated from the asciidoc files

In the global Help Docbook index tree, change BIRT help page to a short
page with a link to the new help

Remove docbook help files for BIRT
2020-07-20 16:08:36 +02:00
holivier bf48bcb098 Documented: ofbiz-plugins / Birt, review existing adoc and migration for
Help docbook file to asciidoc (OFBIZ-11587)

* add license in each file, and remove trailing space
* better numberer list management
* add section Birt in Ofbiz user screen with help migrated file
2020-07-20 15:54:00 +02:00
Suraj Khurana 2144763bc0 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in plugins component.
(OFBIZ-11887)
2020-07-18 12:26:04 +05:30
Suraj Khurana e7ead3697f Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in plugins component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:14:42 +05:30
Suraj Khurana b18669cddc Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.

'{' is not followed by whitespace.

'}' is not followed by whitespace.

'}' is not preceded with whitespace.

'typecast' is not followed by whitespace.

'try' is not followed by whitespace.

';' is preceded with whitespace.
2020-07-11 14:27:09 +05:30
Suraj Khurana 6f264947c7 Improved: Corrected all checkstyle issues related to succeeding space for comma in plugins directory.
(OFBIZ-11805)
Thanks Jacques and Ritesh Kumar for review.
2020-07-09 12:02:54 +05:30
Suraj Khurana c24db772c9 Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors.
(OFBIZ-11805)
Thanks Jacques Le Roux and Ritesh Kumar for review.
2020-07-06 15:28:07 +05:30
Priya SharmaandPriya Sharma dd1d408bc8 [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762) (#24)
* [Improved]: Use GroovyBaseScript's logging utility methods instead of using Debug (OFBIZ-11762)

* [Improved]: Updated all ocurances where we only needed to pass the throwable object, without a message
- We have now added one more utility method to handle these cases. (OFBIZ-11762)

Co-authored-by: Priya Sharma <priya.sharma@example.com>
2020-06-08 13:39:42 +02:00
Suraj Khurana ae31c01fa7 Improved: Change resources with proper naming convention in all plugin components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. Thanks Jacques for review.
2020-05-29 13:14:02 +05:30
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Jacques Le Roux d267d161e0 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

As reported by OWASP ZAP:
A cookie has been set without the SameSite attribute, which means that the
cookie can be sent as a result of a 'cross-site' request. The SameSite attribute
is an effective counter measure to cross-site request forgery, cross-site script
inclusion, and timing attacks.

The solution was not obvious in OFBiz for 2 reasons:

1. There is no HttpServletResponse::setHeader. So we need to use a filter
  (SameSiteFilter) and even that is not enough because of 2:
2. To prevent session fixation we force Tomcat to generates a new jsessionId,
ultimately put in cookie, in LoginWorker::login. So we need to add a call to
SameSiteFilter::addSameSiteCookieAttribute in
UtilHttp::setResponseBrowserDefaultSecurityHeaders.
2020-03-20 17:51:00 +01:00
akash 019cc010fc Improvement: Dropdown/facet at Reports under 'Sale Orders By Channel' is not working fine
(OFBIZ-10624)

Thanks, Ritesh Kumar and Dikpal Kanungo for your contribution.
2020-02-22 18:33:02 +05:30
akash 21e4a7299d Improvement: Print and Export of ViewFacilityInventoryByProduct report into new window
(OFBIZ-10526)

Thanks, Sourabh Punyani and Pierre Smits for your contribution.
2020-02-22 16:48:26 +05:30
Jacques Le Roux 7525177800 Improved: no functional change
This file inadvertently slipped in with a previous commit, it's not needed.
2020-02-19 14:07:04 +01:00
Jacques Le Roux dbde1204e9 Improved: no functional change
This was added for OFBIZ-9198 but was superfluous since the same is already in
the included ecommerce controller
2020-02-12 16:26:43 +01:00
Mathieu Lirzin 1158664ba3 Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)
These declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile

A schema conformance issue has been fixed in ecommerce “web.xml”.
2019-12-07 22:52:30 +01:00
Mathieu Lirzin 5ae9892e4e Improved: Inline ‘UtilGenerics#checkList’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863492 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:22:24 +00:00
Mathieu Lirzin 31fa95fd91 Improved: Inline ‘UtilGenerics#checkMap’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863491 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:21:23 +00:00
Jacques Le Roux f3c3271d12 Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(OFBIZ-11064)

As we all know, Groovy is a powerful language with great built-in functions. 
Groovy Truth[1] is one of them, which is not used properly in our code base. 
We have used UtilValidate Class to validate arguments for Empty or NotEmpty, 
which can easily be done in groovy with built-in functionality[1].
 
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
 
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
 
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{  // Not set, use a default  maxRetry = -1 }

Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero.  So it's best not to use groovy truth for null-checks on
numbers in some cases. 
 
Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Mathieu Lirzin cfea3ca859 Improved: Use the ‘@Override’ annotation
(OFBIZ-10939)

The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.

Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860028 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:44:25 +00:00
Mathieu Lirzin 9354ac2997 Improved: Remove redundant type declarations
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is already done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860025 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:00 +00:00