Author SHA1 Message Date
Jacques Le Roux 32a310ca14 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

Conflicts handled by hand
  scrum/servicedef/services.xml
2021-03-29 13:24:08 +02:00
Michael Brohl 63df767bee Improved: Switch from jCenter to mavenCentral to handle the jCenter
shutdown (OFBIZ-12171)
2021-02-27 14:43:06 +01:00
Jacques Le Roux e7f198427b 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:10:59 +01:00
Pawan Verma 38419ef257 Fixed: Visit disabling causes NullPointerException on ecomm groovy script(OFBIZ-12173)
Used UtilHttp.getSessionId() instead of visit to get session Id.

Thanks: Giulio, Jacopo and Deepak.
2021-02-12 09:27:36 +05:30
Deepak Dixit 4bef6dd715 Updated code as per lucene dependency update (OFBIZ-12100) 2021-01-04 14:43:07 +05:30
Deepak Dixit 1c355bb6d8 Updated lucene and solr dependecy to fix the test case failure related to tika-parser dependency update(OFBIZ-12100) (#48) 2021-01-04 12:45:22 +05:30
Jacques Le Roux 581c68f3c6 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:55:31 +01:00
Jacques Le Roux 96e2deea3b 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

# Conflicts:
#	ecommerce/groovyScripts/content/Search.groovy
2020-12-07 13:22:12 +01:00
Jacques Le Roux aff4aa19ff * 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.

# Conflicts handled by hand:
#	birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java
2020-12-01 09:55:46 +01:00
Saurabh Dixit 819be88570 Fixed: Product summary cards don't have uniform height. (OFBIZ-11910) (#46)
Done following:
1. Used bootstrap card-deck to equalize the height/width of all the product summary cards.

Reference:
https://v4-alpha.getbootstrap.com/components/card/#card-decks

Thanks Guys: Alex Bodnaru for report and suggestion, Saurabh Dixit for the patch, and Daniel Watford for the test
# Conflicts:
#	ecommerce/template/catalog/ProductSummary.ftl
2020-11-30 11:39:18 +01:00
Jacques Le Roux feef385e7e Fixed: Wrong quote marks (OFBIZ-11972)
Thanks: Alex Bodnaru
2020-10-06 16:03:44 +02:00
Jacques Le Roux 128c252942 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

# Conflicts handled by hand
#	birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java
#	birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java
2020-10-04 12:04:07 +02:00
holivier eadffa215b Improved: Error messages when generating HTML and PDF file from AsciiDoc files (OFBIZ-11893)
re-encode birt image Report-Master.png to be supported by asciidoctor
2020-10-02 18:34:40 +02:00
Akash Jain 39494e6a57 Fixed: Error on removing scrum members (OFBIZ-7249)
Thanks, Anurag Chandak for report.
2020-09-01 15:21:14 +05:30
Suraj Khurana b52a5e85e2 Fixed: Typo in class name.
(OFBIZ-11978)
Thanks Alex Bodnaru for reporting and providing the patch.
2020-09-01 15:12:55 +05:30
Jacques Le Roux 1ada36d74d 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:15 +02:00
Jacques Le Roux c903c71aa8 Fixed: multiflex css is linking to wrong location (OFBIZ-11977)
Thanks: Alex
2020-08-30 11:19:34 +02:00
Akash Jain e6e7351309 Fixed: Distorted Final Checkout Review page when Credit card is selected as Payment option (OFBIZ-11920)
Thanks, Rashi Dhagat for reporting.
2020-08-25 21:24:49 +05:30
Akash Jain 2386d02960 Fixed: Product link on Order confirmation page is not responding (OFBIZ-11735)
Thanks, Rashi Dhagat for reporting.
2020-08-03 18:36:58 +05:30
Aditya Sharma 486f1d8a59 Fixed: ui for the product summary in promotion product list (OFBIZ-11906)
The product summary in the row is too slim, leaving 75% of the place unused.
Added CSS that forces to take 100% width
Thanks Alex Bodnaru for reporting and providing the patch
2020-07-24 16:08:46 +05:30
Jacques Le Roux d335f7890f Improved: Rename a few map files (OFBIZ-11882)
Renames a few files to suppress warnings in the browser console.

Thanks: Alex Bodnaru
2020-07-23 09:12:13 +02:00
Pawan Verma 1a8410f98b Fixed: Send me this every month link is not working in order items section(OFBIZ-10891)
Thanks, Ashish for the report, Vivek for lookup and Amit for the patch.
2020-07-11 10:32:51 +05:30
Jacques Le Roux 6d87d52388 Fixed: Error while uploading file in Ecommerce Profile's File Manager (OFBIZ-10746)
This is only fixing the UI where you did not see the file to upload you selected

There is still an issue to upload the file

Changes done by hand, impossible to cherry-pick

Thanks: Priya Sharma for testing
2020-06-23 14:56:32 +02:00
Jacques Le Roux 76775e4a7c Improved: adds pull_request_template.md (OFBIZ-11722) 2020-05-31 09:48:15 +02:00
Pawan Verma 369088d732 Fixed: Improve the buttons on edit credit card page
(OFBIZ-10975)

Thanks: Sourabh and Suraj for your contribution.
2020-05-10 14:14:04 +05:30
Pawan Verma 3e312acc68 Fixed: Product Images not rendering on One Page Checkout
(OFBIZ-11400)

Thanks: Archana Asthana for the report and Devanshu Vyas for the patch.
2020-03-28 12:43:20 +01:00
Jacques Le Roux 62f9b45dcf 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:54:26 +01:00
Jacques Le Roux c8ed017afe Improved: no functional change
Follows the "How to apply the Apache License to your work" section at
https://www.apache.org/licenses/LICENSE-2.0
2020-03-14 12:38:53 +01:00
Jacques Le Roux 88ca87d106 Implemented: have a license
(OFBIZ-11451)

Fixes missing sections in LICENCE and adds NOTICE

I have also removed the plugins prefix in "URIs" because we are under plugins

Thanks: Jacopo for spotting missing sections
2020-03-14 08:28:00 +01:00
Pierre Smits 1ad6d34683 Implemented: have a license
(OFBIZ-11451)
2020-03-13 16:07:12 +01:00
Suraj Khurana 0d05685ad4 Fixed: Unable to remove items from onePageCheckout screen of e-commerce.
(OFBIZ-10800)

Thanks Arpit Mor for reporting and Dhaval Wagela for the patch.
2020-03-02 12:21:34 +05:30
Deepak Dixit 227ecf8023 Upgrade Tomcat from 9.0.29 to 9.0.31 (CVE-2020-1938)
(OFBIZ-11407)

tomcat-embed-websocket dependencies not updated
2020-02-27 19:57:54 +05:30
Jacques Le Roux 3d37294014 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 07:42:32 +01:00
68 changed files with 574 additions and 117 deletions
+11
View File
@@ -0,0 +1,11 @@
Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:
(OFBIZ-)
Explanation
Thanks:
+232
View File
@@ -0,0 +1,232 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=========================================================================
This product bundles "jQuery" and "jQuery" plugins and extensions, which are available
under the "MIT" license. For details, see:
webpos/webapp/webpos/images/js/jquery.hotkeys-0.7.9.min.js
webpos/webapp/webpos/images/js/WebPosHotkeys.js
=========================================================================
This product bundles files from the "Birt" technology platform (www.eclipse.org/birt/)
which are available under the "Eclipse Public License - v 1.0".
For details, see birt/webapp/birt/webcontent/birt/
=========================================================================
This product bundles "Webhelp for DocBook", which is available
under the "MIT" License. For details, see cmssite/template/docbook/webhelp/
=========================================================================
This product bundles "DocBook XSL Stylesheets 1.77.1", which is available
under the "MIT" license.
For details, see cmssite/template/docbook/
=========================================================================
This product bundles "Bootstrap", which is available
under the "MIT" license.
For details, see:
ecommerce/webapp/ecommerce/js
ecommerce/webapp/ecommerce/css
+5
View File
@@ -0,0 +1,5 @@
Apache OFBiz
Copyright 2001-2020 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -77,6 +77,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -85,6 +90,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -72,6 +72,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -80,6 +85,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -57,6 +57,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -65,6 +70,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 196 KiB

@@ -263,7 +263,8 @@ public final class BirtWorker {
String reportForm = (String) resultElectronicText.get("textData");
if (!reportForm.startsWith("<?xml")) {
StringBuffer xmlHeaderForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
xmlHeaderForm.append("<forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
xmlHeaderForm.append("<forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:targetNamespace=\"http://ofbiz"
+ ".apache.org/dtds/widget-form.xsd\">");
xmlHeaderForm.append(reportForm);
xmlHeaderForm.append("</forms>");
reportForm = xmlHeaderForm.toString();
@@ -311,7 +311,9 @@ public class BirtServices {
try {
GenericValue content = EntityQuery.use(delegator).from("Content").where("contentId", reportContentId).queryOne();
String dataResourceId = content.getString("dataResourceId");
StringBuffer newForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <forms xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
StringBuffer newForm = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <forms xmlns:xsi=\"http://www.w3"
+ ".org/2001/XMLSchema-instance\" xsi:targetNamespace=\"http://ofbiz.apache.org/dtds/widget-form.xsd\">");
newForm.append(overrideFilters);
newForm.append("</forms>");
Document xmlForm = UtilXml.readXmlDocument(newForm.toString());
@@ -725,7 +727,7 @@ public class BirtServices {
// user file is deleted straight away to prevent the use of the report as script entry (security)
Path path = Paths.get(nameTempRpt);
Files.deleteIfExists(path);
} catch (Exception e) {
} catch (DesignFileException | IOException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource_error, "BirtErrorInuploadRptDesignNoFile", locale));
}
+9
View File
@@ -63,6 +63,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -71,6 +76,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -54,6 +54,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -62,6 +67,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -63,6 +63,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -71,6 +76,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -58,6 +58,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -66,6 +71,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -53,7 +53,7 @@ import org.apache.ofbiz.webapp.stats.VisitHandler;
// Used to filter website on the basis of hosted pathAlias.
public class WebSiteFilter implements Filter {
public static final String MODULE = WebSiteFilter.class.getName();
public static final String module = WebSiteFilter.class.getName();
protected FilterConfig m_config = null;
@@ -87,7 +87,7 @@ public class WebSiteFilter implements Filter {
webSite = EntityQuery.use(delegator).from("WebSite").where("isDefault", "Y").cache().queryFirst();
}
} catch (GenericEntityException e) {
Debug.logError(e, MODULE);
Debug.logError(e, module);
}
if (webSite != null) {
webSiteId = webSite.getString("webSiteId");
@@ -95,7 +95,7 @@ public class WebSiteFilter implements Filter {
try {
productStore = webSite.getRelatedOne("ProductStore", false);
} catch (GenericEntityException e) {
Debug.logError(e, MODULE);
Debug.logError(e, module);
}
String newLocale = request.getParameter("newLocale");
@@ -122,7 +122,7 @@ public class WebSiteFilter implements Filter {
try {
cart.setCurrency(dispatcher, productStore.getString("defaultCurrencyUomId"));
} catch (CartItemModifyException e) {
Debug.logError(e, MODULE);
Debug.logError(e, module);
}
}
session.removeAttribute("webSiteId");
@@ -151,7 +151,7 @@ public class WebSiteFilter implements Filter {
try {
security = SecurityFactory.getInstance(delegator);
} catch (SecurityConfigurationException e) {
Debug.logError(e, MODULE);
Debug.logError(e, module);
}
request.setAttribute("delegator", delegator);
request.setAttribute("dispatcher", dispatcher);
+9
View File
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -40,6 +40,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableModel;
@@ -2258,12 +2259,20 @@ public class EbayStore {
// Upload image to ofbiz path /runtime/tmp .
ByteBuffer byteWrap = (ByteBuffer) context.get("imageData");
File file = new File(System.getProperty("ofbiz.home"), "runtime" + File.separator + "tmp" + File.separator + imageFileName);
String fileToCheck = System.getProperty("ofbiz.home"), "runtime" + File.separator + "tmp" + File.separator + imageFileName;
File file = new File(fileToCheck);
FileOutputStream fileOutputStream = new FileOutputStream(file, false);
FileChannel wChannel = fileOutputStream.getChannel();
wChannel.write(byteWrap);
wChannel.close();
fileOutputStream.close();
String fileToCheck = imageServerPath + "/" + newFileLocation + "." + imgExtension;
ImageIO.write(bufNewImg, imgExtension, new File(fileToCheck));
if (!org.apache.ofbiz.security.SecuredUpload.isValidFile(fileToCheck, "Image")) {
String errorMessage = UtilProperties.getMessage("SecurityUiLabels", "SupportedImageFormats", locale);
return ServiceUtil.returnError(errorMessage);
}
// Set path file picture to api and set picture details.
String [] pictureFiles = {System.getProperty("ofbiz.home") + File.separator + "runtime" + File.separator + "tmp" + File.separator + imageFileName};
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -86,7 +86,7 @@ if (featureIdByType) {
if (searcher) {
Debug.logInfo("in search searchFeature3, combQuery:" + combQuery.toString(), "")
TopScoreDocCollector collector = TopScoreDocCollector.create(100) //defaulting to 100 results
TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) //defaulting to 100 results
searcher.search(combQuery.build(), collector)
ScoreDoc[] hits = collector.topDocs().scoreDocs
Debug.logInfo("in search, hits:" + collector.getTotalHits(), "")
@@ -18,6 +18,7 @@
*/
import org.apache.ofbiz.base.util.UtilProperties
import org.apache.ofbiz.base.util.UtilHttp
import org.apache.ofbiz.base.util.UtilMisc
import org.apache.ofbiz.product.store.ProductStoreWorker
@@ -54,5 +55,5 @@ if (userInfoMap) {
request.getSession().setAttribute("userInfoMap", userInfoMap)
}
donePage = "main;" + parameters.visit.sessionId
donePage = "main;" + UtilHttp.getSessionId(request)
context.donePage = donePage
@@ -18,7 +18,7 @@ under the License.
-->
<#if productIds?has_content>
<div class="card">
<div class="card promotion-products">
<div class="card-header">
${uiLabelMap.OrderProductsForPromotion}
</div>
+4 -4
View File
@@ -86,7 +86,7 @@ under the License.
</#if>
<tr id="cartItemDisplayRow_${cartLine_index}">
<td headers="orderItem">
<img src="<@ofbizContentUrl>${requestAttributes.contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>"
<img src="<@ofbizContentUrl>${requestAttributes.contentPathPrefix!}${StringUtil.wrapString(smallImageUrl!)!}</@ofbizContentUrl>"
alt = "Product Image" /></td>
<td headers="description">${cartLine.getName(dispatcher)!}</td>
<td class="amount" headers="unitPrice">${cartLine.getDisplayPrice()}</td>
@@ -181,10 +181,10 @@ under the License.
</#if>
<#assign smallImageUrl = Static["org.apache.ofbiz.product.product.ProductContentWrapper"]
.getProductContentAsText(cartLine.getProduct(), "SMALL_IMAGE_URL",
locale, dispatcher, "url")! />
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "" /></#if>
locale, dispatcher, "html")! />
<#if !smallImageUrl?string?has_content><#assign smallImageUrl = "/images/defaultImage.jpg" /></#if>
<#if smallImageUrl?string?has_content>
<img src="<@ofbizContentUrl>${requestAttributes.contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>"
<img src="<@ofbizContentUrl>${requestAttributes.contentPathPrefix!}${StringUtil.wrapString(smallImageUrl!)!}</@ofbizContentUrl>"
alt="Product Image" />
</#if>
</#if>
+13 -15
View File
@@ -336,6 +336,8 @@ $(function(){
</#if>
</#macro>
${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")}
${variantInfoJavaScript!}
<div id="product-detail" class="card">
<#assign productAdditionalImage1 = productContentWrapper.get("ADDITIONAL_IMAGE_1", "url")! />
<#assign productAdditionalImage2 = productContentWrapper.get("ADDITIONAL_IMAGE_2", "url")! />
@@ -705,7 +707,7 @@ $(function(){
<div id="addCart2" style="display:block;">
<span style="white-space: nowrap;"><strong>${uiLabelMap.CommonQuantity}:</strong></span>&nbsp;
<input type="text" class="form-control" size="5" value="1" disabled="disabled"/>
<a href="javascript:showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.CommonPleaseSelectAllFeaturesFirst}");"
<a href="javascript:showErrorAlert('${uiLabelMap.CommonErrorMessage2}','${uiLabelMap.CommonPleaseSelectAllFeaturesFirst}');"
class="btn btn-outline-secondary"><span style="white-space: nowrap;">${uiLabelMap.OrderAddToCart}</span></a>
&nbsp;
</div>
@@ -719,15 +721,13 @@ $(function(){
</select>
</div>
</#list>
<span id="product_uom"></span>
<span id="product_uom"></span><br/>
<div class="variant-price" style="display: none;">
<strong><span class="product_id_display"> </span></strong>
<strong><span class="variant_price_display"> </span></strong>
</div>
<input type="hidden" name="product_id" value="${product.productId}"/>
<input type="hidden" name="add_product_id" value="NULL"/>
<div>
<strong><span id="product_id_display"> </span></strong>
<strong>
<div id="variant_price_display"></div>
</strong>
</div>
<#else>
<input type="hidden" name="add_product_id" value="NULL"/>
<#assign inStock = false />
@@ -737,17 +737,15 @@ $(function(){
<input type="hidden" name="add_product_id" value="${product.productId}"/>
<#if mainProducts?has_content>
<input type="hidden" name="product_id" value=""/>
<select name="productVariantId" class="form-control" onchange="javascript:displayProductVirtualVariantId(this.value);">
<option value="">Select Unit Of Measure</option>
<select name="productVariantId" class="form-control" onchange="javascript:variantUomSelection(this);">
<option value="">${uiLabelMap.CommonSelect} ${uiLabelMap.ProductUnitOfMeasure}</option>
<#list mainProducts as mainProduct>
<option value="${mainProduct.productId}">${mainProduct.uomDesc} : ${mainProduct.piecesIncluded}</option>
</#list>
</select><br/>
<div>
<strong><span id="product_id_display"> </span></strong>
<strong>
<div id="variant_price_display"></div>
</strong>
<div class="variant-price" style="display: none;">
<strong><span class="product_id_display"> </span></strong>
<strong><span class="variant_price_display"> </span></strong>
</div>
</#if>
<#if (availableInventory??) && (availableInventory <= 0) && "N" == product.requireAmount?default("N")>
@@ -51,6 +51,8 @@
}
//-->
</script>
${screens.render("component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productvariantjs")}
${variantInfoJavaScript!}
<#if product??>
<#-- variable setup -->
<#if "Y" == backendPath?default("N")>
@@ -72,16 +74,15 @@
<#assign productDetailId = "productDetailId"/>
<#assign productDetailId = productDetailId + product.productId/>
<div class="col-md-3 products-card">
<div class="col-md-4 products-card card-deck">
<div class="card text-center">
<a href="${productUrl}">
<img class="card-img-top" src="<@ofbizContentUrl>${contentPathPrefix!}${smallImageUrl}</@ofbizContentUrl>" alt="Small Image">
</a>
<div class="card-body">
<h4 class="card-title"><a href="${productUrl}" class="btn btn-link">${productContentWrapper.get("PRODUCT_NAME", "html")!}</a></h4>
<div class="cart-text">
<div class="card-text">
<div>${productContentWrapper.get("DESCRIPTION", "html")!}<#if daysToShip??>&nbsp;-&nbsp;${uiLabelMap.ProductUsuallyShipsIn} <b>${daysToShip}</b> ${uiLabelMap.CommonDays}!</#if></div>
<#-- Display category-specific product comments -->
<#if prodCatMem?? && prodCatMem.comments?has_content>
<p>${prodCatMem.comments}</p>
@@ -196,15 +197,15 @@
</div>
<#if mainProducts?has_content>
<input type="hidden" name="product_id" value=""/>
<select name="productVariantId" onchange="javascript:displayProductVirtualId(this.value, '${product.productId}', this.form);">
<option value="">Select Unit Of Measure</option>
<select name="productVariantId" onchange="javascript:variantUomSelection(this);" style="width: 100%;">
<option value="">${uiLabelMap.CommonSelect} ${uiLabelMap.ProductUnitOfMeasure}</option>
<#list mainProducts as mainProduct>
<option value="${mainProduct.productId}">${mainProduct.uomDesc} : ${mainProduct.piecesIncluded}</option>
</#list>
</select>
<div style="display: inline-block;">
<strong><span id="product_id_display"> </span></strong>
<strong><span id="variant_price_display"> </span></strong>
<div class="variant-price" style="display: none;">
<strong><span class="product_id_display"> </span></strong>
<strong><span class="variant_price_display"> </span></strong>
</div>
</#if>
</div>
@@ -24,7 +24,6 @@ under the License.
<#if !creditCard??>
<h2>${uiLabelMap.AccountingAddNewCreditCard}</h2>
<form method="post" action="<@ofbizUrl>createCreditCard?DONE_PAGE=${donePage}</@ofbizUrl>" name="editcreditcardform">
<div>
<#else>
<h2>${uiLabelMap.AccountingEditCreditCard}</h2>
<form method="post" action="<@ofbizUrl>updateCreditCard?DONE_PAGE=${donePage}</@ofbizUrl>" name="editcreditcardform">
@@ -32,6 +31,7 @@ under the License.
</#if>
<a href="<@ofbizUrl>${donePage}</@ofbizUrl>" class="btn btn-outline-secondary">${uiLabelMap.CommonGoBack}</a>
<a href="javascript:document.editcreditcardform.submit()" class="btn btn-outline-secondary">${uiLabelMap.CommonSave}</a>
<div>
${screens.render("component://ecommerce/widget/CustomerScreens.xml#creditCardFields")}
<label class="mb-2">${uiLabelMap.PartyBillingAddress}</label>
<#-- Removed because is confusing, can add but would have to come back here with all data populated as before...
+14 -4
View File
@@ -464,10 +464,20 @@ under the License.
<input type="hidden" name="statusId" value="CTNT_PUBLISHED"/>
<input type="hidden" name="roleTypeId" value="OWNER"/>
<label class="mr-2">${uiLabelMap.EcommerceUploadNewFile}</label>
<label class="custom-file mr-2">
<input type="file" name="uploadedFile" class="custom-file-input"/>
<span class="custom-file-control"></span>
</label>
<div class="custom-file mr-2">
<input type="file" class="custom-file-input" id="customFile" required/>
<label class="custom-file-label" for="customFile">Choose file</label>
<div class="invalid-feedback">Example invalid custom file feedback</div>
</div>
<script>
$('#customFile').on('change',function(){
//get the file name
var fileName = $(this).val();
fileName = fileName.replace('C:\\fakepath\\', " ");
//replace the "Choose a file" label
$(this).next('.custom-file-label').html(fileName);
})
</script>
<select name="partyContentTypeId" class="custom-select mr-2">
<option value="">${uiLabelMap.PartySelectPurpose}</option>
<#list partyContentTypes as partyContentType>
+8 -2
View File
@@ -25,6 +25,12 @@ under the License.
<hr/>
</td>
</tr>
${screens.render("component://accounting/widget/CommonScreens.xml#creditCardFields")}
<tr>
<td width="26%" align="right" valign="top">
<div class="tableheadtext">${uiLabelMap.AccountingCreditCardInformation}</div>
</td>
<td width="5">&nbsp;</td>
<td width="74%">&nbsp;</td>
</tr>
${screens.render("component://ecommerce/widget/CustomerScreens.xml#creditCardFields")}
+10 -3
View File
@@ -21,6 +21,14 @@ under the License.
<#-- the "urlPrefix" value will be prepended to URLs by the ofbizUrl transform if/when there is no "request" object in the context -->
<#if baseEcommerceSecureUrl??><#assign urlPrefix = baseEcommerceSecureUrl/></#if>
<div class="card">
<#if "Y" == maySelectItems?default("N") && "PLACING_CUSTOMER" == roleTypeId!>
<form method="post" id="sendMeThisEveryMonthForm" name="sendMeThisEveryMonthForm" action="<@ofbizUrl fullPath='true'>createShoppingListFromOrder</@ofbizUrl>">
<input type="hidden" name="orderId" value="${orderHeader.orderId}"/>
<input type="hidden" name="frequency" value="6"/>
<input type="hidden" name="intervalNumber" value="1"/>
<input type="hidden" name="shoppingListTypeId" value="SLT_AUTO_REODR"/>
</form>
</#if>
<#if "Y" == maySelectItems?default("N")>
<form name="addCommonToCartForm" action="<@ofbizUrl>addordertocart/orderstatus</@ofbizUrl>" method="post">
<input type="hidden" name="add_all" value="false" />
@@ -36,8 +44,7 @@ under the License.
class="btn btn-sm float-right">${uiLabelMap.OrderAddAllToCart}</a>
<a href="javascript:document.addCommonToCartForm.add_all.value='false';document.addCommonToCartForm.submit()"
class="btn btn-sm float-right">${uiLabelMap.OrderAddCheckedToCart}</a>
<a href="<@ofbizUrl fullPath="true">createShoppingListFromOrder?orderId=${orderHeader.orderId}&amp;frequency=6&amp;intervalNumber=1&amp;shoppingListTypeId=SLT_AUTO_REODR</@ofbizUrl>"
class="btn btn-sm float-right">${uiLabelMap.OrderSendMeThisEveryMonth}</a>
<button form="sendMeThisEveryMonthForm" class="btn btn-sm float-right" type="submit">${uiLabelMap.OrderSendMeThisEveryMonth}</button>
</#if>
</strong>
</div>
@@ -145,7 +152,7 @@ under the License.
<#else>
<#assign product = orderItem.getRelatedOne("Product", true)!/> <#-- should always exist because of FK constraint, but just in case -->
<td>
<a href="<@ofbizCatalogAltUrl fullPath="true" secure="false" productId=orderItem.productId/>"
<a href="<@ofbizCatalogAltUrl secure="false" productId=orderItem.productId/>"
class="linktext">${orderItem.productId} - ${orderItem.itemDescription?default("")}</a>
<#assign orderItemAttributes = orderItem.getRelated("OrderItemAttribute", null, null, false)/>
<#if orderItemAttributes?has_content>
@@ -25,7 +25,7 @@ under the License.
<handler name="java" type="request" class="org.apache.ofbiz.webapp.event.JavaEventHandler"/>
<handler name="groovy" type="request" class="org.apache.ofbiz.webapp.event.GroovyEventHandler"/>
<handler name="soap" type="request" class="org.apache.ofbiz.webapp.event.SOAPEventHandler"/>
<!-- <handler name="soap" type="request" class="org.apache.ofbiz.webapp.event.SOAPEventHandler"/> -->
<handler name="service" type="request" class="org.apache.ofbiz.webapp.event.ServiceEventHandler"/>
<handler name="service-multi" type="request" class="org.apache.ofbiz.webapp.event.ServiceMultiEventHandler"/>
<handler name="simple" type="request" class="org.apache.ofbiz.webapp.event.SimpleEventHandler"/>
@@ -134,7 +134,7 @@ under the License.
<request-map uri="setSessionLocale">
<security https="false" auth="false"/>
<event type="java" path="org.apache.ofbiz.common.CommonEvents" invoke="setSessionLocale"/>
<response name="success" type="request-redirect" value="fromSetSessionLocale"/>
<response name="success" type="request-redirect" value="fromSetSessionLocale"/>
<response name="error" type="view" value="main"/>
</request-map>
@@ -85,6 +85,11 @@ under the License.
<param-value>/control/main</param-value>
</init-param>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -101,6 +106,10 @@ under the License.
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
<!-- <listener><listener-class>org.apache.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
@@ -120,4 +120,8 @@ button.jGrowl-close {
.hidden {
height: 0;
visibility: hidden;
}
.promotion-products .products-card {
width: 100%;
max-width: 100%;
}
@@ -595,7 +595,11 @@ function updateShippingSummary() {
jQuery('#completedShippingContactNumber').html(shippingContactPhoneNumber);
jQuery('#completedEmailAddress').html(jQuery('#emailAddress').val());
jQuery('#completedShipToAddress1').html(jQuery('#shipToAddress1').val());
jQuery('#completedShipToAddress2').html(jQuery('#shipToAddress2').val());
if (jQuery('#shipToAddress2').val()) {
jQuery('#completedShipToAddress2').show().html(jQuery('#shipToAddress2').val());
} else {
jQuery('#completedShipToAddress2').hide();
}
if (jQuery('#shipToStateProvinceGeoId').val() == "_NA_") {
var shipToGeo = jQuery('#shipToCity').val()+", "+jQuery('#shipToCountryGeoId').val()+" "+jQuery('#shipToPostalCode').val();
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -18,5 +18,5 @@
*/
dependencies {
pluginLibsCompile 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.19'
pluginLibsCompile 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.31'
}
+9
View File
@@ -60,6 +60,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -68,6 +73,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -55,6 +55,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -63,6 +68,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+1 -1
View File
@@ -18,5 +18,5 @@
*/
dependencies {
pluginLibsCompile 'org.jasig.cas:cas-server-core:3.3.5'
pluginLibsCompile 'org.apereo.cas:cas-server-support-ldap-core:5.0.10'
}
@@ -29,7 +29,8 @@ import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import org.jasig.cas.util.LdapUtils;
import org.apereo.cas.util.LdapUtils;
import org.ldaptive.LdapEntry;
import org.apache.ofbiz.base.util.UtilXml;
import org.apache.ofbiz.ldap.commons.AbstractOFBizAuthenticationHandler;
import org.w3c.dom.Element;
@@ -91,7 +92,8 @@ public final class OFBizActiveDirectoryAuthenticationHandler extends AbstractOFB
}
String filter = UtilXml.childElementValue(rootElement, "Filter", "(objectclass=*)");
String attribute = UtilXml.childElementValue(rootElement, "Attribute", "uid=%u");
attribute = LdapUtils.getFilterWithValues(attribute, username);
LdapEntry entry = new LdapEntry(username);
attribute = LdapUtils.getString(entry, attribute);
NamingEnumeration<SearchResult> answer = ctx.search(baseDN,
// Filter expression
"(&(" + filter + ") (" + attribute +"))",
@@ -27,7 +27,8 @@ import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import org.jasig.cas.util.LdapUtils;
import org.apereo.cas.util.LdapUtils;
import org.ldaptive.LdapEntry;
import org.apache.ofbiz.base.util.UtilXml;
import org.apache.ofbiz.ldap.commons.AbstractOFBizAuthenticationHandler;
import org.w3c.dom.Element;
@@ -76,7 +77,8 @@ public final class OFBizLdapAuthenticationHandler extends AbstractOFBizAuthentic
}
String filter = UtilXml.childElementValue(rootElement, "Filter", "(objectclass=*)");
String attribute = UtilXml.childElementValue(rootElement, "Attribute", "uid=%u");
attribute = LdapUtils.getFilterWithValues(attribute, username);
LdapEntry entry = new LdapEntry(username);
attribute = LdapUtils.getString(entry, attribute);
NamingEnumeration<SearchResult> answer = ctx.search(baseDN,
// Filter expression
"(&(" + filter + ") (" + attribute +"))",
+4 -4
View File
@@ -17,7 +17,7 @@
* under the License.
*/
dependencies {
pluginLibsCompile 'org.apache.lucene:lucene-core:7.1.0'
pluginLibsCompile 'org.apache.lucene:lucene-queryparser:7.1.0'
pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:7.1.0'
}
pluginLibsCompile 'org.apache.lucene:lucene-core:8.5.2'
pluginLibsCompile 'org.apache.lucene:lucene-queryparser:8.5.2'
pluginLibsCompile 'org.apache.lucene:lucene-analyzers-common:8.5.2'
}
+1 -1
View File
@@ -94,7 +94,7 @@ if (searchFeature1 || searchFeature2 || searchFeature3 || !featureIdByType.isEmp
}
}
if (searcher) {
TopScoreDocCollector collector = TopScoreDocCollector.create(100) //defaulting to 100 results
TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) //defaulting to 100 results
searcher.search(combQuery.build(), collector)
ScoreDoc[] hits = collector.topDocs().scoreDocs
@@ -57,7 +57,7 @@ if (parameters.luceneQuery) {
}
combQuery.add(query, BooleanClause.Occur.MUST)
TopScoreDocCollector collector = TopScoreDocCollector.create(100) // defaulting to 100 results
TopScoreDocCollector collector = TopScoreDocCollector.create(100, 100) // defaulting to 100 results
searcher.search(combQuery, collector)
ScoreDoc[] hits = collector.topDocs().scoreDocs
productList = []
@@ -41,7 +41,7 @@ public final class SearchWorker {
public static final String module = SearchWorker.class.getName();
private static final Version LUCENE_VERSION = Version.LUCENE_7_1_0;
private static final Version LUCENE_VERSION = Version.LUCENE_8_5_2;
private SearchWorker() {}
@@ -95,7 +95,7 @@ public class LuceneTests extends OFBizTestCase {
combQueryBuilder.add(query, BooleanClause.Occur.MUST);
BooleanQuery combQuery = combQueryBuilder.build();
TopScoreDocCollector collector = TopScoreDocCollector.create(10);
TopScoreDocCollector collector = TopScoreDocCollector.create(10, 10);
searcher.search(combQuery, collector);
assertEquals("Only 1 result expected from the testdata", 1, collector.getTotalHits());
+9
View File
@@ -70,6 +70,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -78,6 +83,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -61,8 +61,14 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping><filter-name>ControlFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
<filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
<filter-mapping><filter-name>SameSiteFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+1 -1
View File
@@ -35,7 +35,7 @@ under the License.
<property name="VT_STYLESHEET['add']" value="/ecommerce/images/blog.css"/>
<property name="VT_STYLESHEET['add']" value="/multiflex/style.css"/>
<property name="VT_STYLESHEET['add']" value="/contentimages/css/contentForum.css"/>
<property name="VT_STYLESHEET['add']" value="/ecommerce/js/bootstrap/js/bootstrap-4.3.1.min.css"/>
<property name="VT_STYLESHEET['add']" value="/ecommerce/js/bootstrap/css/bootstrap-4.3.1.min.css"/>
<!--template location-->
<property name="VT_HDR_TMPLT_LOC" value="component://multiflex/template/Header.ftl"/>
<property name="VT_FTR_TMPLT_LOC" value="component://multiflex/template/Footer.ftl"/>
+9
View File
@@ -57,6 +57,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -65,6 +70,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -60,6 +60,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -68,6 +73,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+9
View File
@@ -60,6 +60,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -68,6 +73,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -56,6 +56,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -64,6 +69,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -31,6 +31,7 @@ inputFields.putAll(parameters)
performFindInMap.noConditionFind = "Y"
performFindInMap.inputFields = inputFields
performFindInMap.orderBy = parameters.sortField
performFindInMap.filterByDate = "Y"
if (parameters.sortField) {
performFindInMap.orderBy = "lastName"
}
+2 -26
View File
@@ -2197,31 +2197,6 @@
</simple-method>
<simple-method method-name="deleteScrumResource" short-description="remove scrum resource">
<entity-one entity-name="UserLogin" value-field="sysUserLogin">
<field-map field-name="userLoginId" value="system"/>
</entity-one>
<if-compare operator="equals" value="SCRUM_PRODUCT_OWNER" field="parameters.groupId">
<set field="parameters.roleTypeId" value="PRODUCT_OWNER"/>
</if-compare>
<if-compare operator="equals" value="SCRUM_MASTER" field="parameters.groupId">
<set field="parameters.roleTypeId" value="SCRUM_MASTER"/>
</if-compare>
<if-compare operator="equals" value="SCRUM_TEAM" field="parameters.groupId">
<set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
</if-compare>
<!-- For special role -->
<if-compare operator="equals" value="SCRUM_STAKEHOLDER" field="parameters.groupId">
<set field="parameters.roleTypeId" value="STAKEHOLDER"/>
</if-compare>
<entity-and entity-name="PartyRole" list="partyRoles">
<field-map field-name="partyId" from-field="parameters.partyId"/>
<field-map field-name="roleTypeId" from-field="parameters.roleTypeId"/>
</entity-and>
<if-not-empty field="partyRoles">
<set-service-fields service-name="deletePartyRole" map="parameters" to-map="deletePartyRoleMap"/>
<set field="deletePartyRoleMap.userLogin" from-field="sysUserLogin"/>
<call-service service-name="deletePartyRole" in-map-name="deletePartyRoleMap"/>
</if-not-empty>
<now-timestamp field="nowTimestamp" />
<entity-and entity-name="UserLoginSecurityGroup" list="userLoginSecurityGroups">
<field-map field-name="userLoginId" from-field="parameters.userLoginId"/>
@@ -2229,7 +2204,8 @@
</entity-and>
<if-not-empty field="userLoginSecurityGroups">
<iterate list="userLoginSecurityGroups" entry="userLoginSecurityGroup">
<remove-value value-field="userLoginSecurityGroup"/>
<set field="userLoginSecurityGroup.thruDate" from-field="nowTimestamp"/>
<store-value value-field="userLoginSecurityGroup"/>
</iterate>
</if-not-empty>
</simple-method>
+6 -6
View File
@@ -221,14 +221,14 @@ under the License.
<service name="checkSprintStatus" engine="simple" auth="true"
location="component://scrum/minilang/ScrumServices.xml" invoke="checkSprintStatus">
</service>
<service name="checkScrumPlanHour" engine="simple" auth="true"
<service name="checkScrumPlanHour" engine="simple" auth="true"
location="component://scrum/minilang/ScrumServices.xml" invoke="checkScrumPlanHour">
<attribute name="workEffortId" type="String" mode="IN" optional="true"/>
<attribute name="custRequestId" type="String" mode="IN" optional="true"/>
<attribute name="planHours" type="Double" mode="IN" optional="true"/>
<attribute name="allow" type="Boolean" mode="OUT" optional="false"/>
</service>
<service name="reOrderProductBacklogItemSequenceNumber" engine="simple" auth="true"
<service name="reOrderProductBacklogItemSequenceNumber" engine="simple" auth="true"
location="component://scrum/minilang/ScrumServices.xml" invoke="reOrderProductBacklogItemSequenceNumber">
<attribute name="productId" type="String" mode="IN" optional="false"/>
</service>
@@ -250,11 +250,11 @@ under the License.
<description>Updates the Timesheet status back to in process to be able to correct errors</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<service name="updateScrumRevision" engine="soap" export="true"
<!-- The service below has been commented out for security reason, see OFBIZ-12212 -->
<!-- <service name="updateScrumRevision" engine="soap" export="true"
location="http://www.example.com/webtools/control/SOAPService" invoke="updateScrumRevisionChange">
<implements service="updateScrumRevisionChange"/>
</service>
</service> -->
<service name="updateScrumRevisionChange" engine="simple" export="true" validate="false" require-new-transaction="true"
location="component://scrum/minilang/ScrumServices.xml" invoke="updateScrumRevisionChange">
<description>Update Scrum Revision Change</description>
@@ -287,7 +287,7 @@ under the License.
<service name="linkToProduct" engine="java" auth="true"
location="org.apache.ofbiz.scrum.ScrumServices" invoke="linkToProduct">
<description>check when a comunication event is created if the subject contains the PD# string, if so
<description>check when a comunication event is created if the subject contains the PD# string, if so
try to find the customer request and link it to the communication event..
</description>
<attribute name="communicationEventId" type="String" mode="IN" optional="false"/>
+9
View File
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.apache.ofbiz.webapp.control.ControlEventListener
+3 -1
View File
@@ -645,7 +645,9 @@ under the License.
<request-map uri="createProductAndRole">
<security https="true" auth="true"/>
<event type="simple" invoke="createProductAndRole" path="component://scrum/minilang/ScrumEvents.xml"/>
<response name="success" type="request-redirect-noparam" value="ViewProduct"/>
<response name="success" type="request-redirect" value="ViewProduct">
<redirect-parameter name="productId"/>
</response>
<response name="error" type="request-redirect" value="EditProduct"/>
</request-map>
<request-map uri="createProductRole">
+9
View File
@@ -53,6 +53,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -61,6 +66,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+6 -4
View File
@@ -17,14 +17,16 @@
* under the License.
*/
dependencies {
pluginLibsCompile 'org.apache.solr:solr-core:7.1.0'
pluginLibsCompile 'com.google.guava:guava:20.0'
// Remember to change the version number in SearchWorker class when upgrading.
// Also Solr et Lucene should use the same version, luceneMatchVersion should be updated in solrconfig.xml
pluginLibsCompile 'org.apache.solr:solr-core:8.5.2'
pluginLibsCompile 'com.google.guava:guava:28.0-jre'
}
configurations.all {
resolutionStrategy {
dependencySubstitution {
substitute module('com.google.guava:guava') with module('com.google.guava:guava:20.0')
substitute module('com.google.guava:guava') with module('com.google.guava:guava:28.0-jre')
}
}
}
}
+1 -1
View File
@@ -35,7 +35,7 @@
that you fully re-index after changing this setting as it can
affect both how text is indexed and queried.
-->
<luceneMatchVersion>6.6.0</luceneMatchVersion>
<luceneMatchVersion>8.5.2</luceneMatchVersion>
<!-- <lib/> directives can be used to instruct Solr to load any Jars
identified and use them to resolve any "plugins" specified in
@@ -25,11 +25,12 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.solr.servlet.RedirectServlet;
import org.apache.commons.lang3.StringUtils;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.security.Security;
import org.apache.ofbiz.webapp.control.LoginWorker;
import org.apache.solr.servlet.RedirectServlet;
/**
* OFBizSolrRedirectServlet.java - Master servlet for the ofbiz-solr application.
@@ -68,11 +69,11 @@ public class OFBizSolrRedirectServlet extends RedirectServlet {
String contextPath = request.getContextPath();
String uri = request.getRequestURI();
if (UtilValidate.isNotEmpty(contextPath) && uri.startsWith(contextPath)) {
uri = uri.replaceFirst(request.getContextPath(), "");
uri = StringUtils.replaceOnce(uri, request.getContextPath(), "");
}
String servletPath = request.getServletPath();
if (UtilValidate.isNotEmpty(servletPath) && uri.startsWith(servletPath)) {
uri = uri.replaceFirst(servletPath, "");
uri = StringUtils.replaceOnce(uri, servletPath, "");
}
response.sendRedirect(contextPath + "/control/checkLogin" + uri);
return true;
+9
View File
@@ -61,6 +61,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -69,6 +74,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->