Use importLibrary js function to load locale-specific datepicker js.
Corrected locale naming in macro to use '.locale'.
Tested page at /ordermgr/control/findreturn and /ordermgr/control/orderentry.
Use importLibrary js function to load time-related js and css for date time picker.
Tested page at /ordermgr/control/findreturn and /ordermgr/control/orderentry
Finally removes ol.js.map and references to it because it does not help due to
concatenations of multiple files in the multi mb source distribution.
Thanks: Alex Bodnaru for inquiry
* Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-11752)
Upgraded jQuery to 3.5.2 and jQuery migrate to 3.3.0 to vulnerabilities of medium severity
Regex in its jQuery.htmlPrefilter sometimes may introduce XSS; https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
* Fixed: console error TypeError: document is undefined
(OFBIZ-11752)
As the document object was not passed to the IFFE call for the FORMALIZE function, it gives console error for the missing document object when accessed
(OFBIZ-11466)
In theme.xml of common-theme there is a reference to application.js residing in
the Flatgrey theme. This should not be. The file should be in common-theme.
Thanks: Pierre Smits for report and fix. I have just also removed
rainbowstone/js/application.js since it's now in common-theme
(OFBIZ-11329)
This will be notably useful when committing CSRF solution as explained in
OFBIZ-11306:
SetTimeZoneFromBrowser when starting gives a RequestHandlerException:
Invalid or missing CSRF token for AJAX call to path '/SetTimeZoneFromBrowser'.
Also not only when starting.
Thanks: James Yong for review
(OFBIZ-11211)
The issue is that when closing the modal the div inside html dom is not removed.
Then opening a second time create another identical div. Since a lookup is based
on an unique id, this id is no more unique...
Thanks: Carl Demus
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867577 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-11207)
When you create a xml form with upload as type, you can't use on-event-update-area element to submit it by ajax.
Otherwise, OFBiz return an error message on 'uploadFile is empty.
To solve it, we analyze the enctype's form before submit it to move on FormData instead a direct serialize [1]
example form where the problem has been present
****
<form name='AddNicelyFile' type='upload' target='CreateNicelyFile'>
<field name='uploadedFile' title='File'><file/></field>
<field name='addButton'><submit/></field>
<on-event-update-area event-type='submit' area-id='window' area-target='FileDisplaying'/>
</form>
****
Thanks to Samuel Tregouet for this fix
[1] https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867435 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10678)
1. For solving CVE-2019-11358, upgraded jQuery to 3.4.1
2. Replaced library Fancybox with Featherlight. Added custom css so that cursor for links becomes pointer
Thanks Jacques Le Roux for the reviews
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863838 13f79535-47bb-0310-9956-ffa450edef68
called directly.
(OFBIZ-10895)
Today Olivier reported directly to me that there was an issue in HR:
<<If you go to humanres, at the level of the tree that appears the icons to expand
the tree no longer appear (but you can click...)
This is due to the path of the d.png image which is wrong in the css file
(there is too much image in the path)>>
I should have seen it because the d.png file is, with other related image files,
in the same directory than style.css. And there was an inconsistency in the
style.css files regarding the d.png file path.
We should note that we have still this error in log:
2019-07-22 16:25:26,275 |jsse-nio-8443-exec-7 |ControlServlet
|E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request [d.png];
this request does not exist or cannot be called directly.
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest
(RequestHandler.java:277) ~[ofbiz.jar:?]
As I wrote in my last commit for OFBIZ-10895:
The only safe way to go is to not only check the error log for
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log.
Some error appears before the user is logged in, as I wrote in the Jira:
<<I noticed that this error message often appears before login. A 404 can be
seen in the access log and then once logged the issue no longer exists
(ie we get a 200). I have no yet investigated why...>>
Nevertheless, I want to remove this misleading error message. I hope I'll do
that before forgetting.
Thanks: Olivier Heintz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863560 13f79535-47bb-0310-9956-ffa450edef68
called directly.
(OFBIZ-10895)
I was wrong doing massive changes w/o close control.
I decided to revert the r1859576 and r1859807 commits and to backport the revert
The only safe way to go is to not only check the error log for
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860526 13f79535-47bb-0310-9956-ffa450edef68
called directly.
(OFBIZ-10895)
This error happens in many occasions:
Inside another request (eg LookupProduct)
Of after a request (eg login)
It shows only in log and have no effect on UI. Notably the new feature normally
showing an error message in trunk (OFBIZ-10753) does not shows
It happens in all supported releases. IIRW it always happened, only URLs like
https://demo-trunk.ofbiz.apache.org/images/defaultImage.jpg work.
But here it's different because we don't need to call
https://demo-trunk.ofbiz.apache.org/images by hand to get the issue in log.
So it's not very bad since it's has no side effects, just weird and annoying.
Because it might hide something undetected yet...
This issue does not appear in R15, a good place to test is for instance
ordermgr/control/request.
There cal.gif is called by /images/cal.gif and it works (the images appears)
but in more recent versions the call is also done to
/ordermgr/control/images/cal.gif where it fails.
This 1st appears in ControlFilter in the stack trace.
As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images,
else browser append this in request info. There is nothing related to java or
tomcat code.
This is a 1st commit for the errors I already reported and I'm sure about
Thanks: Deepak
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858444 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9849)
Silghtly modified patch as Specify-other Dropdown field were not working. Refactored code in combobox.js file
Thanks Dhaval Wagela for the initial patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856610 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10716)
I came across a situation where an entity was taking too much of a time
(browser asked me to either wait or kill) while loading/searching results in the
Webtools application. The entity had close to 5M records, and I checked the
server responded timely but the rendering of the screen was taking time.
When I explored the issue I came across a macro which renders the pagination on the screen, and it had a code block which was causing the screen rendering delay.
<#assign x=(listSize/viewSize)?ceiling>
<#list 1..x as i>
<#if i == (viewIndex+1)><option selected="selected" value="<#else><option value="</#if>${i-1}">${i}</option>
</#list>
This code seems logical enough to me, and what I gather from this is that the
list will render a select box with 250,000 options.
I like propose a change in this UI/UX from select box to an input text box so an
user can navigate to any page, similar to a navigation input box in a PDF
document reader application.
Thanks: Devanshu Vyas for the patch, Nicolas for discussion and Kumar Rahul for
testing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856145 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10814)
Fixes incorrect retrieval of the Authorization header JWT token.
Fixes wrong API usage for the key parameter which assumed the key is
provided in BAS64 format.
Refactored the code to use helper methods for key and auth header
retrieval.
Javadoc corrections and enhancements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852882 13f79535-47bb-0310-9956-ffa450edef68
authentication
(OFBIZ-10307)
Non functional change
Removes now useless "webappName" var after I put in the SecuredUserLoginId
cookies.
Thanks: Michael for spotting it in OFBIZ-10814
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851885 13f79535-47bb-0310-9956-ffa450edef68