Commit Graph
562 Commits
Author SHA1 Message Date
Nicolas Malin 20e00c82a3 Fixed: Add to cart is not working for products with selectable features (OFBIZ-11970)
Two issues were present, first was due to incorrect markup and the second was due to ajax request and response view of the additem request.
In additem request last saved view or the view of the last request is rendered on successful operation and in this case the last request/view is the one which is used to render UOM dropdown.

Thanks: Akash Jain and Ravi Lodhi
2021-09-28 14:11:52 +02:00
Jacques Le Roux 874c830fbb Improved: Fix issues reported by SonarQube analysis on Github (OFBIZ-12284)
Fixes few bugs
2021-08-06 18:16:41 +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 a3438121d8 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
2021-03-29 13:29:58 +02:00
Jacques Le Roux f9069945ad Improved: Rename some connoted words like blacklist and whitelist (OFBIZ-12168)
Renames respectively blacklist and whitelist to denylist and allowlist in
several places.

Renames masters and slaves to mains and replicas in solrconfig.xml inherited
from the Apache Solr version we use. The slave word is still used at
https://cwiki.apache.org/confluence/display/solr/SolrConfigXml referenced from
solrconfig.xml

There are still a lot of master word which can be replaced by main, but not in
contexts where slave is also used. I'll discuss that on dev ML again...
2021-02-09 09:55:43 +01:00
James Yong 9c40c67e7a Improved: Open FTL File from browser (OFBIZ-12018)
Add request map for ecommerce
2020-09-25 22:25:15 +08:00
James Yong 1c9f2ab9c6 Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Not important to track server hits for getJs request
2020-08-25 21:58:26 +08:00
Jacques Le Roux 809d2ce300 Improved: bootstrap-bundle*.js contains bootstrap*.js (OFBIZ-11969)
Non-bundle is redundant, with performance hit.

I also replaced in multiflex theme

Thanks: Alex Bodnaru
2020-08-22 11:08:59 +02:00
Aditya Sharma cfba1f3fe2 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:06:33 +05:30
Jacques Le Roux a0f7e77e77 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:23 +02:00
Jacques Le Roux a905d459bd Improved: Rename a few map files (OFBIZ-11882)
Renames a few files to suppress warnings in the browser console.

Thanks: Alex Bodnaru
2020-07-19 16:04:18 +02:00
Jacques Le Roux 899d3061fe Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
The ecommerce and webpos controller missed an errorpage reference.
All other controllers either use directly the common-controller or indirectly by
including controller/s that include the common-controller
2020-07-18 11:15:18 +02:00
Jacques Le Roux df8b8213ff Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
Those are no longer needed, replaced by error.ftl
2020-07-16 17:14:42 +02:00
Jacques Le Roux a50442d121 Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
At https://markmail.org/message/n76cchtriexxmgm7 I asked

Why having the ftl handlers only in webtools controller? BTW it makes the XSD
documentation awkward because it speaks about the ftl handlers being in
handlers-controller.xml
Why not using error.ftl in common-controller.xml instead of error.jsp?
Same question for plugins.

And answered

I believe we could change all that and definitely get rid of error.jsp
(error.ftl is already in all supported releases branches)
2020-07-15 20:56:23 +02:00
James Yong e7f587d8af Improved: Apply multi-block attr to each application (OFBIZ-11706)
Fix regression
2020-05-16 19:40:27 +08:00
Jacques Le Roux 2c98bc3835 reverted: CLONE - Use only HTTPS in OFBiz
(OFBIZ-11643)

Reverted, this needs more work
2020-05-04 13:22:10 +02:00
Jacques Le Roux 40143e6dba Fixed: CLONE - Use only HTTPS in OFBiz
(OFBIZ-11643)

When doing OFBIZ-6849 I forgot to take care of the https attribute of the
security element used in controllers.

It's not used anymore since we used HTTPS everywhere but in request listed in
http.request-map.list property of url.properties. It's even enforced by HSTS for
requests that are not listed in this property.

This removes the https attribute and removes its usage in in controllers.
2020-05-04 13:10:29 +02:00
Jacques Le Roux cf272a9750 Improved: POC for CSRF Token
(OFBIZ-11306)

There is no need to change it in common-controller because, apart the ecommerce
application, there are no applications that requires an anonymous flow.
It should be only changed in ecommerce controller.
2020-04-04 18:22:26 +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
Jacques Le Roux cca9d4d783 Improved: "auth" should be true for all the request url used for Application
components

(OFBIZ-4956)

Put back getAssociatedStateList requesdt in ecommerce to auth="false" to allow
the anonymous flow

Thanks: Deepak for spotting an reporting the issue (twice, inadvertently I
removed the complete file, I have no ideas how I did that :/)
2020-03-17 11:38:52 +01:00
Jacques Le Roux 9f87efe7ba Improved: "auth" should be true for all the request url used for Application
components

(OFBIZ-4956)

Put back getAssociatedStateList requesdt in ecommerce to auth="false" to allow
the anonymous flow

Thanks: Deepak for spotting an reporting the issue
2020-03-16 11:31:48 +01:00
Jacques Le Roux e72e1348c1 Improved: "auth" should be true for all the request url used for Application
components

(OFBIZ-4956)

Currently there are some URLs present in application components with
auth="false". So anyone can hit these URLs and access these resources without
authorization.

I think all the URLs should be secure with auth="true"

Thanks: Amardeep Singh Jhajj for report and initial fix
2020-03-14 08:49:54 +01:00
Suraj Khurana 2de8058af8 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:18:52 +05:30
Jacques Le Roux e5e7567798 Fixed: The "stream" request-map in ecommerce and commonext controllers
requires authentication
(OFBIZ-11349)

Thanks: Michael for reporting a possible issue when only commenting the "stream"
request-map in commonext controller. And Jacopo to suggest to require
authentication (after suggesting to comment out)

It should be also noted that when the CSRF defense implementation will be in
place, all XSS vulnerabilities w/o authentication will not longer be possible.
Because then all requests shall contains a CSRF token.
2020-02-19 13:55:35 +01:00
Jacques Le Roux c004c8f00b Improved: Temporarily comment out the "stream" request-map in ecommerce
controller for security reason
(OFBIZ-11348)

No functional change, simply amend the comment
2020-02-14 10:22:15 +01:00
Jacques Le Roux 57de034e1c Fixed: Temporarily comment out the "stream" request-map in ecommerce controller
for security reason
(OFBIZ-11348)

A vulnerability has been reported to the OFBiz security team. We were able to
quickly and quietly fix it in supported versions, but in the ecommerce component.
To be able to release the 17.12.01 version with this vulnerability fixed we need
to temporarily comment out the "stream" request-map in ecommerce controller.
We will later fix the specific issue in ecommerce to put back the functionnalities
allowed by the "stream" request-map in ecommerce controller.
2020-02-13 06:50:51 +01:00
Jacques Le Roux dbde1204e9 Improved: no functional change
This was added for OFBIZ-9198 but was superfluous since the same is already in
the included ecommerce controller
2020-02-12 16:26:43 +01:00
Aditya Sharma e8021b7ede Implemented: Cookie Consent In E-Commerce
(OFBIZ-11333)
The Cookie Law is a piece of privacy legislation that requires websites to get consent from visitors to store or retrieve any information on their computer, smartphone or tablet. It was designed to protect online privacy, by making consumers aware of how information about them is collected and used online, and give them a choice to allow it or not.

The EU Cookie Legislation began as a directive from the European Union. Some variation on the policy has since been adopted by all countries within the EU.

The EU Cookie Legislation requires 4 actions from website owners who use cookies:
1. When someone visits your website, you need to let them know that your site uses cookies.
2. You need to provide detailed information regarding how that cookie data will be utilized.
3. You need to provide visitors with some means of accepting or refusing the use of cookies in your site.
4. If they refuse, you need to ensure that cookies will not be placed on their machine.

Used bsgdprcookies plugin to implement the feature. Thanks Deepak Nigam for initiating and providing initial patch. Thanks Deepak Nigam, Pierre Smits, Michael Brohl, Jacques Le Roux and Swapnil M Mane for inputs.
2020-02-10 11:46:58 +05:30
Jacques Le Roux 15750b9d5a Fixed: User should not be directed to main page after adding product to cart
from showcart page
(OFBIZ-11223)

    Navigate to URL: https://demo-trunk.ofbiz.apache.org/ecomseo/
    Click on View Cart at top-right of the page (User will be directed to showcart page)
    Enter product number (Eg: GZ-2644)
    Enter quantity
    Click on add to cart

Product is added to the cart but user is directed to main page of ecommerce. 


Thanks: Arpit Mor for report, Sourabh Punyani for the fix
2020-01-25 10:57:15 +01:00
Pawan Verma 0c6a80ac69 Fixed: Corrected file path for ProcessPaymentSettings.groovy
(OFBIZ-11324)
2020-01-25 11:41:45 +05:30
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
Pawan Verma 9a33a3cc1e Implemented: Improve add to compare screen with latest bootstrap framework
(OFBIZ-10968)

Thanks, Nitish Mishra for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1867662 13f79535-47bb-0310-9956-ffa450edef68
2019-09-28 10:14:24 +00:00
Nicolas Malin 0572dfa89d Improved: Any ecommerce user has the ability to reset anothers password (including admin) via "Forget Your Password"
(OFBIZ-4361)

Update ecommerce plugin to use the forget passord process with jwtToken :
  * Add jwtToken managment on update password page
  * Change changepassword to passwordChange on controller for align with common-controller



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1867647 13f79535-47bb-0310-9956-ffa450edef68
2019-09-27 19:25:08 +00:00
Aditya Sharma 3747e3d283 Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-10678)
For solving CVE-2018-14041, Bootstrap upgraded to latest 4.3.1
Thanks Jacques Le Roux for the reviews

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863839 13f79535-47bb-0310-9956-ffa450edef68
2019-07-27 06:48:11 +00:00
Jacques Le Roux acad8b02d8 Improved: Ecommerce image distorted in trunk demo main page
(OFBIZ-11095)

Due to recent bootstrap changes, ecommerce image is distorted in trunk demo main 
page

Thanks: Nitish Mishra

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1861867 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 14:01:03 +00:00
Suraj Khurana 7dce2fcedc Fixed: Blank page appears after using Tell-A-Friend functionality while adding item to cart.
(OFBIZ-10885)
Thanks Ravi Lodhi for reporting and Nitish Mishra for providing the patch.

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

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

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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Suraj Khurana f915292fdb Fixed: Product image not scaling properly on ecommerce at different screen resolution.
(OFBIZ-10880)
Thanks Arpit Mor for reporting and Praveen Sharma for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1859914 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 07:20:21 +00:00
Deepak Dixit bd6ba0835d Improved: Amount field is editable at Product Detail Page
(OFBIZ-10663)
Added mising css and js code to show/hide the amount field based on Product.requireAmount field.
Thanks  Dikpal Kanungo for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1857120 13f79535-47bb-0310-9956-ffa450edef68
2019-04-08 16:51:32 +00:00
Jacques Le Roux 7c76483d91 Fixed: Unable to create new quote from cart at eCommerce store
(OFBIZ-10886)

Actually we decided that an external user should not be able to create quotes
but only requests for quote.

This disables creating quotes from the ecommerce. An authorised user can still
do the same from the backedn (order manager)

Thanks: Sanjay Yadav for initial report, Sasikant Biswal for trying, Pierre for
mentioning that this should not be open to external users and Pawan Verma for 
the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1856917 13f79535-47bb-0310-9956-ffa450edef68
2019-04-04 12:17:35 +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
Aditya Sharma baabf6b25d Improved: Replace jQuery.bind() with jQuery.on()
(OFBIZ-10758)
As of jQuery 3.0, .bind() has been deprecated. It was superseded by the .on() method for attaching event handlers to a document.
Additional change:
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1850712 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 05:08:40 +00:00
Jacques Le Roux 7a48532e18 Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

Steps to regenerate:
Open URL: https://demo-trunk.ofbiz.apache.org/ecommerce/control/main. 
  Welcome is displayed and user's name is not displayed when URL is opened.
Login at ecommerce, username will be displayed after user logs in.
Logout of ecommerce by clicking on logout. User will be logged out and login 
  link will be displayed in place of logout link, but the name of user is still 
  displayed.

Actual: Username is still displayed after user logs out
Expected: Username should not be displayed after the user logs out

Note: Similar issue also exists when the user clicks on (Not You?) link.

Thanks: Arpit Mor for detailled report, Deepak Dixit for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1848398 13f79535-47bb-0310-9956-ffa450edef68
2018-12-07 13:14:48 +00:00
Jacques Le Roux baae0891eb Reverted: User should be redirected to view cart page after adding the product
from compare product screen
(OFBIZ-10667)

Revert r1847478

There was a problem with this fix. It changes the behaviour of additem when you 
add an item from the main or another page.

The behaviour is defined by the "Always View Cart After Adding An Item." 
checkbox in the cart view.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1847530 13f79535-47bb-0310-9956-ffa450edef68
2018-11-27 11:27:39 +00:00
Jacques Le Roux a801e93e0e Fixed: User should be redirected to view cart page after adding the product
from compare product screen
(OFBIZ-10667)

Currently user is navigating add item page instead of view cart page while 
adding product to cart from compare product screen. User gets stuck after 
navigating over add item page.

Steps to replicate the issue: 
 1. Go to eCommerce application.
 2. Click on add to compare button for the products - 
    Round Gizmo and Tiny Chrome Widget.
 3. Click on 'Compare Products' from right bar.
 4. Click on 'Add to cart' over compare product screen.

Expected behaviour : User should be redirected to view cart page instead 
of add item page.

Thanks: Ratnesh Upadhyay for report and Ritesh Kumar for the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1847528 13f79535-47bb-0310-9956-ffa450edef68
2018-11-27 11:18:07 +00:00
Jacques Le Roux a8d7cd417d Improved: Have eCommerce component reflect the new situation re iDEAL
(OFBIZ-5445)

Remove IDEAL related code from the ecommerce component.

When the IDEAL solution isn't part of the accounting component, the code in 
ecommerce should be removed as well. 

Thanks: Pierre Smits

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1846229 13f79535-47bb-0310-9956-ffa450edef68
2018-11-09 10:30:52 +00:00
Jacques Le Roux 0cd8756918 Improved: Remove few request-map "edit" attributes in controllers
(OFBIZ-10608)

As documented, currently

    Reserved for future use (not used yet).

I checked, it's still not implemented. So no need to confuse people for now, 
better to remove until it's really used.




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844744 13f79535-47bb-0310-9956-ffa450edef68
2018-10-24 08:57:03 +00:00
Jacques Le Roux edb2e18fa0 Improved: UI for all promotions listing disturbed
(OFBIZ-10462)
The "checkout section" in the ecommerce main page is not easily legible
(OFBIZ-10414)

Steps to regenerate the issue are as follows:
1) Navigate to storefront
2) Click on "View All Promotions" button.

Expected:
All promotions should be in a listed format.

Actual:
All promotions are listed inline.

jleroux: I also added a space after uiLabelMap.CommonDetails in 
ShowAllPromotions template in order

This also improves OFBIZ-10414

Thanks: Pritam Kute

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1840263 13f79535-47bb-0310-9956-ffa450edef68
2018-09-06 20:42:10 +00:00
Suraj Khurana 6579ae5e8c Fixed: Java object rendering on billing section of one page anonymous checkout process.
(OFBIZ-10425)
Thanks Jason Hao for reporting and Priya Sharma for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1838816 13f79535-47bb-0310-9956-ffa450edef68
2018-08-24 10:55:54 +00:00
Suraj Khurana 6662fe8677 Improved: Rename deletePartyContactMechPurpose* services with proper names.
Thanks everyone for discussions.
(OFBIZ-10398)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1836895 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 12:31:12 +00:00