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
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
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
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...
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
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
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)
(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.
(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.
(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.
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 :/)
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
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
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.
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.
(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.
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
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”.
(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
(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
(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
(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
(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
(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
(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
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
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
(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
(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
(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