After checking that we don't have any possible vulnerability using
jquery-ui-dist (ie 1.12.1) vs jquery-ui (1.13.0) based on* and checking in code
I decided to use jquery-ui-dist from npm. I just had to modify OfbizUtil.js to
get back to element.form() (for 1.12.1) vs element._form() for 1.13.0
I hope the npm jquery-ui-dist package will be updated soon. The release of
1.13.0 is quite fresh (<1 month).
We also need a mechanism to check the update or our npm packages.
As Aditya explained:
<<Minor updates can be handled implicitly by node when specified with tilde
range or caret range for version. For major updates, we just have to change
the version and use npm install.>>
So for now it will be manual. Later something like** could be used (I wonder
about https://snyk.io/, but that needs Infra agreement)
* https://blog.jqueryui.com/2021/10/jquery-ui-1-13-0-released/
** https://dev.to/dennismphil/automate-your-node-dependency-updates-4aga
GH CodeQL reports 556 "Incomplete string escaping or encoding branch" issues
(there are 588 issues at all).
Most of them are in jQuery-UI but not only. So this only an attempt to clarify
among the 23 pages reported by upgrading jQuery-UI to 1.13.0.
Removed javascript for jQuery, jQuery Migrate, jQuery Browser and jQuery Validation from OFBiz sources. Instead these are now retrieved during the build as NPM packages using gradle-node-plugin.
Thanks: Aditya Sharma for implementation.
(OFBIZ-11813)
To homogenize and help each theme to implement correctly the screen engine concept,
we add two sub-decorators like existing 'FindScreenDecorator'.
DetailScreenDecorator can be used to display a sum up of an object and
its related data.
Embedded Decorator can be used to inject a specific screen in an
structured page area.
Those are composed of several sections that can be handled by the
theme for specific display.
Thanks Nicolas
(OFBIZ-10601)
To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.
For this we add a new attribute on webapp definition app-shortcut-screen :
<webapp name="mywebapp"
...
app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
...
/>
The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming
<screen name="ShortcutApp">
<section>
<actions>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="body">
<include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.
To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.
Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
This reverts commit 17eb2e4cf7.
It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!
Thanks: James for report
(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/
change in HelpScreen.xml
(OFBIZ-11335)
Currently on OFBiz we implemented a process to define some different
screen and menu that can be implemented by the theming.
But for the form we have nothing. All style are hard coded on each
<grid name="ListEntities" ...
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
I extend the theming implementation principle to forms element with adding :
* a new xsd element common-forms (like common-screens)
* some default form templates to extend :
* grid CommonSimpleGrid
* grid CommonBasicGrid
* form CommonSimpleList
* form CommonBasicList
* form CommonInLineEditList
* form CommonBasicSingle
We can use its like :
<form name="LayoutDemoList" extends="CommonBasicList"
extends-resource="component://common/widget/CommonForms.xml"
The main difficulty raise to this task was propage the visualTheme during
the ModelForm intanciation, because we need to load wiget style
(and some other information wanted on the template) on model load in memory.
This is cover by commit 1941a05a34.
Forms present on the screen https://localhost:8443/webtools/control/WebtoolsLayoutDemo
are now extend through with theme.
Finally with this we can extend style form (pagination, header, line and so on ...)
directly by your theme without change the framework.
(including admin) via "Forget Your Password"
(OFBIZ-4361)
Currently, any user (via ecommerce "Forget Your Password") has the ability to
reset another users password, including "admin" without permission.
By simply entering "admin" and clicking "Email Password", the following is
displayed:
The following occurred:
A new password has been created and sent to you. Please check your Email.
This now forces the user of the ERP to change their password.
It is also possible to generate a dictionary attack against ofbiz because there
is no capta code required. This is serious security risk.
I have modified the patch following comments I made in the Jira, notably
Removed unused Java variables
Removed a check in LoginEvents::forgotPassword which prevented to show error
messages
Changed fr and en SecurityExtPasswordSentToYou
+ SecurityExtThisEmailIsInResponseToYourRequestToHave labels
+ template PasswordEmail.ftl
+ loginservices.token_incorrect labels
Added fr and en SecurityExtIgnoreEmail + SecurityExtLinkOnce labels
Removed changes in general.properties
I did not remove the 2 GetSecurityQuestion.ftl files (webpos one was still in)
There is still room for improvement. I'll discuss them on the Jira and dev
ML. But this version is already strong enough to not wait that the patch is
inapplicable!
Thanks: mz4wheeler (Mike Z) for the Jira, Nicolas Malin for the patch, I guess
with some Gil's help, and all others for comments and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866478 13f79535-47bb-0310-9956-ffa450edef68
components
(OFBIZ-9905)
As the title says + removes now useless labels
Thanks: Aayush Jain for report, Sourabh Jain for the fix, Pierre Smits and
Rishi Solanki for comments
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858291 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9241)
While working on OFBIZ-9206 I remembered how the ecommerce webapp is deeply
entrenched in some applications components. This can at least be tested with
product and catalog webapp.
Get to catalog/control/EditProduct?productId=GZ-1000
Click on the "Product Page" button => ecommerce
There are much more cases (96 occurrences actually) but most of them are not
hard dependencies.
Since the ecommerce component is now a plugin, we need to remove all ecommerce
links from applications, I even wonder if this issue is really an improvement
or should not be now considered a bug...
This is a temporary solution with a FIXME it was waiting for months and I
almost forgot it. There are better ideas in the Jira but nothing have been done
yet.
Thanks: Michael and Deepak for discussion and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857398 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10515)
Introduce a new feature that allow the impersonation of a login by an authorized user.
Add the documentation with all the details in security-impersonation.adoc.
Big thanks to Leila, Nicolas and Jacques for your contribution to this implementation.
Big thanks to Mathieu, Jacques, Pierre and Taher for your remarks and reviews that
improved this contribution quality.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1842110 13f79535-47bb-0310-9956-ffa450edef68
Five step WARNING these step is separate on many commit break all the UI
#1 Prepare the common screens to retrieve widget.properties, VisualThemeRessources and common screen location from the modelTheme
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806137 13f79535-47bb-0310-9956-ffa450edef68
Third step, move macro ftl libraries and ftl template present on framework common to common theme
At this step, the common-theme is forced like the common component previously.
Main common screens present on CommonScreens.xml, LookupScreens.xml and HelpScreens.xml are moved to common screen with a forced rewrite to common-theme
Warning this commit is going to follow with a other commit for CommonScreens.xml because LookupScreens.xml and HelpScreens.xml are recreated on common-theme, but to keep the history of CommonScreens.xml it was moved entirely, the second commit restore it with redirect call.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806091 13f79535-47bb-0310-9956-ffa450edef68
Updated label from remove to expire while removing security group from user login, also added new entity-auto service to expire user login security group record.
Thanks S. Yazied for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803561 13f79535-47bb-0310-9956-ffa450edef68
local browser.
(OFBIZ-9264)
If a time zone is already set for a user, this new feature won't override it.
The user still can set it's own time zone, but if it isn't set,
this avoids the time zone set to the default of the server.
jelroux: the momentjs license is MIT
Thanks: Francis Douet
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1788256 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7758)
I am running on trunk rev 1751489 on tomahawk theme.
In the browser, right-click and view the page source.
There is duplicate linking of jquery.jgrowl.min.css i.e.
<link rel="stylesheet" href="/images/jquery/plugins/jquery-jgrowl/1.4.1/jquery.jgrowl.min.css" type="text/css"/>
The solution is to remove a hack for JPublish in fex Java classes
and related changes (mostly "page." in ftl and xml files)
Thanks: Rohit Koushal for the path and James Yong the report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761235 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8099)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761103 13f79535-47bb-0310-9956-ffa450edef68
1) Removed 'maincss.css' entry from 'allowedPaths' param of from web.xml
Reason: Since, there is no file like 'maincss.css' exist under any includes directory.
2) Removed the unused references of maincss.css from FTLs, code
<link rel="stylesheet" href="${StringUtil.wrapString(baseUrl!)}/images/maincss.css" type="text/css"/>
has been removed.
Reason: This is an interesting thing, these FTLs were using the maincss.css located under the images directory.
When I look the history of these files, following were my findings,
The 'maincss.css' file under the 'images' directory exist in release4.0
http://svn.apache.org/repos/asf/ofbiz/branches/release4.0/framework/images/webapp/images/
after this release, this files no longer exist there.
3) Also, I have updated one file 'InventoryNoticeEmail.ftl' and used the basic HTML code to style, instead of using style defined in 'maincss.css' which were exist in release-4.0
4) Updated some references from 'maincss.css' to style.css in comments.
5) Also removed the entry of including '/images/maincss.css' and '/images/mainrtl.css' in SimpleDecorator
Since, these files no longer exist after release-4.0.
Thanks Wai for reviewing the work and thanks Swapnil M Mane for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758389 13f79535-47bb-0310-9956-ffa450edef68
The TransactionTotalsPdf.pdf currently doesn't show the name of the company it has been generated for.
jleroux: I asked Pierre to check that "Aree we sure that the changes in Simple.fo.ftl are general enough? I mean did you check that they will not appear in inopportune places?"
Pierre's answer: Checked against most occurrences where the SimpleDecorator is used. A few weren't possible to check due to missing demo data.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758091 13f79535-47bb-0310-9956-ffa450edef68
jleroux: I updated the patch. I fixed things by hand: tabs in the groovy files, removed the ftl file because of a tree conflicts due to the recent ftl files move and updated org.ofbiz to org.apache.ofbiz in CertKeystore.groovy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1753024 13f79535-47bb-0310-9956-ffa450edef68
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68