Commit Graph
218 Commits
Author SHA1 Message Date
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 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 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
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 f152d031cb Improved: solve Error messages when generating HTML and PDF file from
AsciiDoc files (OFBIZ-11893)

minor corrections after framework corrections
2020-10-02 11:47:07 +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
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
Suraj Khurana 6dfc3c19e7 Improved: Corrected some extra spaces and naming conventions related checkstyle issues.
(OFBIZ-11921)
Also fixed some access modifiers for some private class members. Thanks Jacques Le Roux for review.
2020-08-31 20:01:25 +05:30
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
James Yong 76b5ef7932 Improved: Move page-specific script links to html template (OFBIZ-11799)
Moved OpenLayer js and css to html template
Tested on https://localhost:8443/partymgr/control/PartyGeoLocation?partyId=DemoCustomer
2020-08-13 22:27:36 +08:00
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
Jacques Le Roux 9c87fb85b1 Improved: Update build.gradle to the latest dependencies (OFBIZ-11903)
See
https://cwiki.apache.org/confluence/display/OFBIZ/About+OWASP+Dependency+Check
for libs not upgraded.
2020-07-21 10:42:14 +02:00
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
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 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
Pawan Verma 9c369dc489 Improved: Expansion of form widget field disabled atrribute with xsd improvement (#21)
(OFBIZ-10432)

Added disabled attribute support in ModelFormField with xs: boolean type
Removed specific field level disabled attribute support for CheckField and TextField
Modified existing usage of the disabled attribute as per new implementation.
Added new DisabledFieldExampleForm under Form Widget Examples for all the fields with disabled attributes.

Thanks: Rishi for the report and Taher, Gil and Jacques for the feedback
2020-05-19 17:37:19 +05:30
James Yong ca5e6b45f1 Improved: Apply multi-block attr to each application (OFBIZ-11706)
For remaining plugin applications.
2020-05-16 13:37:43 +08:00
Jacques Le Roux 1cacb15000 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

I tried to update to Groovy 3 but got a compile issue with commons-cli.
I did not dig further.
2020-04-21 12:00:32 +02:00
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
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
Jacques Le Roux 229027647f Fixed: EditExample always update status, because current Status not shown
(OFBIZ-11230)

In the EditExample Form, the drop-down is populates with the Valid change status 
only. So current status is not in the list and the status print in the drop-down 
is the next authorized. I want to modify exampleName or exampleType, I go to 
editExample and change what I want and validate. The problem is status is also 
changed!

There are 12 other same or similar cases. For the first of them (in FinAccount) 
there is the same bug: when I change FinAccount Name, status change too. If I 
add current="first-in-list" in the tag drop-down it works 

jleroux: Quote is a peculiar case due to OFBIZ-7337 which was a wrong fix
 
Thanks: Oliver for the analysis and the fix 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1868545 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 12:19:33 +00:00
Jacques Le Roux 23dbe19690 Improved: Upgrade Tomcat from 9.0.26 to 9.0.27
(OFBIZ-11249)

Forgot a plugin, as ever :/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1868544 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 12:18:00 +00:00
Jacques Le Roux 682f3438f3 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11245)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1868194 13f79535-47bb-0310-9956-ffa450edef68
2019-10-09 14:06:47 +00:00
Mathieu Lirzin af4b7336c9 Improved: Remove redundant "dtd" directory from classpath
(OFBIZ-11161)

the "dtd" directories are already present as resources distributed
inside OFBiz jar, so there is no need to augment the classpath to find
the XML schema inside those directories.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1865797 13f79535-47bb-0310-9956-ffa450edef68
2019-08-24 00:30:34 +00:00
Jacques Le Roux 4f19b762f3 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11151)

Like for OFBIZ-10922 some updates were not possible. Please refer to the Jira 
for more information

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1864973 13f79535-47bb-0310-9956-ffa450edef68
2019-08-12 15:03:03 +00:00
Jacques Le Roux 82f440a4a1 Improved: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

Currently the CORS demonstration in example component is useless.
This tooltip allows local users to test it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1862538 13f79535-47bb-0310-9956-ffa450edef68
2019-07-04 08:14:05 +00:00
Jacques Le Roux b6c99b8921 Improved: Update Tomcat to 9.0.21
(OFBIZ-11102)

Mostly because of various concurrency and stability fixes for HTTP/2 as reported 
in the official announcement

Once again missed to commit in example/build.gradle

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1861262 13f79535-47bb-0310-9956-ffa450edef68
2019-06-13 14:21:48 +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
Jacques Le Roux b5adaeee94 Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1859735 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:41:04 +00:00
Suraj Khurana 90c06a42b0 Improved: Use code128 instead of code39 for barcode generation.
(OFBIZ-10896)
Currently, we are using code39 to generate barcodes but there are some limitations of code39 as it only able to encrypt letters from A to Z, digits from 0 to 9 and an additional set of special characters – “. $ % + – / *”.
Thanks Pawan Verma for reporting, analysis and providing the patch. Thanks everyone else for providing their inputs during discussion on Dev ML.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1858243 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 06:18:17 +00:00
Jacques Le Roux 0f45353684 Improved: no functional change
Removes unused PrepareLocalesForDropDown.groovy

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1857622 13f79535-47bb-0310-9956-ffa450edef68
2019-04-16 06:26:47 +00:00
Jacques Le Roux 7865fec6b6 Fixed: Update Tomcat to 9.0.18 due to CVE-2019-0232
(OFBIZ-10920)

CVE-2019-0232 Apache Tomcat Remote Code Execution on Windows

Severity: Important

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.17
Apache Tomcat 8.5.0 to 8.5.39
Apache Tomcat 7.0.0 to 7.0.93

Description:
When running on Windows with enableCmdLineArguments enabled, the CGI
Servlet is vulnerable to Remote Code Execution due to a bug in the way
the JRE passes command line arguments to Windows. The CGI Servlet is
disabled by default. The CGI option enableCmdLineArguments is disabled
by default in Tomcat 9.0.x (and will be disabled by default in all
versions in response to this vulnerability). For a detailed explanation
of the JRE behaviour, see Markus Wulftange's blog [1] and this archived
MSDN blog [2].

Mitigation:
Users of affected versions should apply one of the following mitigations:
- Ensure the CGI Servlet initialisation parameter enableCmdLineArguments
    is set to false
- Upgrade to Apache Tomcat 9.0.18 or later when released
- Upgrade to Apache Tomcat 8.5.40 or later when released
- Upgrade to Apache Tomcat 7.0.93 or later when released
This announcement is being made before the releases are available as the
change to fix this issue is obviously security related.

Credit:
This issue was identified by an external security researcher and
reported to the Apache Tomcat security team via the bug bounty program
sponsored by the EU FOSSA-2 project.


jleroux: actually Tomcat 9.0.19 was released, here it is

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1857586 13f79535-47bb-0310-9956-ffa450edef68
2019-04-15 14:36:51 +00:00
Jacques Le Roux 70895a3646 Fixed: Update Tomcat to 9.0.16 due to CVE-2019-0199
(OFBIZ-10873)

The HTTP/2 implementation accepted streams with excessive numbers of
SETTINGS frames and also permitted clients to keep streams open without
reading/writing request/response data. By keeping streams open for
requests that utilised the Servlet API's blocking I/O, clients were able
to cause server-side threads to block eventually leading to thread
exhaustion and a DoS.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1856212 13f79535-47bb-0310-9956-ffa450edef68
2019-03-25 17:47:52 +00:00
Jacques Le Roux c702407c32 Fixed: Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

Non functional change

Removes now useless "webappName" var after I put in the SecuredUserLoginId 
cookies.

Thanks: Michael for spotting it in OFBIZ-10814

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1851885 13f79535-47bb-0310-9956-ffa450edef68
2019-01-23 07:14:21 +00:00
Aditya Sharma 81e93b444f Improved: Replace Inline js with External js in renderDateFindField macro
(OFBIZ-9850)
Added an example in FormWidgetExamples for the field.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1851316 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 04:57:08 +00:00
Jacques Le Roux 844fc542d8 Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Jacques Le Roux adeaa4a869 Improved: Better explain fields in FormWidgetExampleForms
(OFBIZ-6734)

Removes 3 useless TODO

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1849116 13f79535-47bb-0310-9956-ffa450edef68
2018-12-17 17:36:56 +00:00
Jacques Le Roux e5f5603563 Improved: Resolve possible conflicts for masked date input feature
(OFBIZ-10719)

As it's useless and confusing, for now comments out the only occurrence

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1849084 13f79535-47bb-0310-9956-ffa450edef68
2018-12-17 12:49:50 +00:00
Jacques Le Roux 7934c1c8ed Improved: In widget forms display element has not time type
(OFBIZ-6731)

bq. <date-time input-method="time-dropdown"
is used instead we have 11 matches in code.

Removes the occurrence in example component


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1849027 13f79535-47bb-0310-9956-ffa450edef68
2018-12-16 13:14:30 +00:00
Jacques Le Roux 695301d303 Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Michael Brohl 08bb7bddeb Fixed: Update and fix openstreetmap.org integration.
(OFBIZ-10553)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1847711 13f79535-47bb-0310-9956-ffa450edef68
2018-11-29 10:47:11 +00:00
Jacques Le Roux 4ef341f142 Improved: Update build.gradle to the latest dependencies
(OFBIZ-10214)

4 updates were not possible:
  Tika 1.18 max
  Poi 3.17 max
I did not update
  sshd-core
  cas-server-core

Please refer to the Jira for more information

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1847026 13f79535-47bb-0310-9956-ffa450edef68
2018-11-20 16:42:05 +00:00
Jacques Le Roux 7f6b866ccf Implemented: Navigate from a domain to another with automated signed in
authentication
(OFBIZ-10307)

This uses a JWT Token authentication to get from one domain, where you are 
signed in, to another domain where you get signed in automatically. 
Something like ExternalLoginKey or Tomcat SSO, but not on the same domain.

In the example component, the FormWidgetExamples screen contains 2 new fields 
in the LinksExampleForm which demonstrate the use from a local instance to the
trunk demo instance.

A simple documentation is available in 
  framework\webapp\src\docs\asciidoc\_include\wa-cross-domains-SSO.adoc

Thanks: Taher for review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844880 13f79535-47bb-0310-9956-ffa450edef68
2018-10-26 09:32:46 +00:00