Commit Graph
2250 Commits
Author SHA1 Message Date
Jacques Le Roux 952519e898 Documented: Changes "Default User Documentation website uri" (OFBIZ-12456)
Related to BuildBot migration from 0.8 to 3.2 version (INFRA-22279).
2021-12-31 10:47:02 +01:00
Pierre Smits 1bbd2c2e2f Improved: Dutch UiLabels (OFBIZ-10363) (#402) 2021-12-09 18:36:05 +01:00
Jacques Le Roux ed0eb9c907 Improved: uses diamond syntax in JsLanguageFilesMapping class
No functional change
2021-12-08 16:35:33 +01:00
Jacques Le Roux 6274fbedbe Improved: Adds the Attributs French label 2021-11-30 12:24:15 +01:00
Jacques Le Roux 49362441b7 Improved: Use NPM with gradle to get external JS dependencies (OFBIZ-11960)
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
2021-11-11 16:05:35 +01:00
wpaetzold 3d93c2709e Fixed: Builds fail due to unauthorized access to repo.spring.io/plugins-release (OFBIZ-12351) (#334)
Replaces repository syndication by rometools

Thanks Mart Naum for report
2021-11-09 14:34:44 +01:00
Jacques Le Roux d83603f064 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (INFRA-22279)
At Gavin's request a non functional change to test Buildbot migration
2021-11-06 12:48:40 +01:00
Jacques Le Roux ce564ebc2a Improved: Try to reduce "Incomplete string escaping or encoding branch" issues reported by CodeQL (OFBIZ-12356)
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.
2021-10-31 15:29:30 +01:00
Jacques Le Roux 49cae3c73a Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Adds getter and setter to ScreenRenderer class
Adds unused hashCode method to ControllerRequestArtifactInfo class
Makes final UomWorker and ContactHelper classes

Only 10 checkstyle issues now
2021-10-17 15:45:55 +02:00
Jacques Le Roux 87f9981f71 Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Fixes wrong methods names in EntityFunction class
2021-10-17 10:49:51 +02:00
Aditya Sharma 4bd30ce4d5 Implemented: Use NPM with gradle to get external JS dependencies (OFBIZ-11960)
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.
2021-10-12 20:50:41 +01:00
Jacques Le Roux dfc05edbab Improved: Remove Docbook parts now useless since Ascidoc is used for online help (OFBIZ-12327)
At https://markmail.org/message/inoihmcon37wq5zz I suggested:

If I'm not wrong, we no longer use Docbook anywhere. So I suggest to remove it
from:

1. cmssite component, where it was used by the online help, now assured by
    Asciidoc. BTW, for whom it could concern, I noticed that anchors jumping
    in adoc files does not work in online help
2. docbook.dtd in content component only used by the cmssite component
3. docbook.css in themes, I'm not sure that still useful there
2021-09-25 10:31:03 +02:00
Nicolas Malin c97d9e7010 Improved: Set Helveticus Theme as default (OFBIZ-12318)
As shared on dev mailing list thread [1], we set Helveticus as default theme

[1] https://s.apache.org/2cm25
2021-09-14 22:38:43 +02:00
Nicolas Malin 4bb54a1d1c Improved: Improve login page for Helveticus Theme (OFBIZ-12313)
Update the login page for Helveticus theme to keep the same spirit.

Thanks to Marine Desmarchelier for her work
2021-09-09 18:33:50 +02:00
Eugen Stan 25c75e2839 Implemented: Clojure Service engine (OFBIZ-12302) (#317)
* Added Clojure service and service test and example service
* Added clojure engine
2021-08-10 16:09:39 +02:00
Nicolas Malin 2aa68dc4de Fixed: UserLoginHistory failed the store operation with large password (OFBIZ-12287)
When you have a user with long password (greater than 256 characters) present in OFBiz and you try to log with, OFBiz return a long error message with sensitive information due to exceeding value size to store on the field UserLoginHistory.passwordUsed.

To solve this we don't return any information on the genericValue that failed and analyze the field passwordUsed to escape the case where the password set to login is create than the database field capacity.

Thanks to Daniel Elkabes <daniel.elkabes@whitesourcesoftware.com> and Hagai Wechsler <hagai.wechsler@whitesourcesoftware.com> from white source software to raise the problem.
2021-07-28 11:59:03 +02:00
Nicolas Malin de4213f017 Improved: Add description for all color orientation on Helveticus theme (OFBIZ-12288) 2021-07-28 11:25:15 +02:00
Jacques Le Roux 2c421cedfb Fixed: Add http to https redirect rule for ofbiz.apache.org (OFBIZ-10590)
This prevented to run the stable demo, hence the next, weirdly the trunk had
not this problem. Anyway better safe than sorry... Maybe related to Gradle
version or rather libs loaded?

The reason why the stable (and old) demos were not running is because the
EntitySaxReaderTests did not pass
2021-07-20 07:47:32 +02:00
Jacques Le Roux 0a91996090 Improved: adds a description for Helveticus theme 2021-07-10 12:44:04 +02:00
Nicolas Malin ff8a141581 Implemented: Keep paginate list query on dynamic refresh (OFBIZ-12261)
Complete previous commit with adding CommonDynamicList form on common previously forgot but present on common-theme
2021-07-09 20:13:29 +02:00
Nicolas Malin 3770cdbb38 Implemented: Keep paginate list query on dynamic refresh (OFBIZ-12261)
Complete previous commit with adding CommonDynamicGrid and CommonDynamicSingle form on common-theme previously forgot
2021-07-07 10:10:27 +02:00
Gil Portenseigne 38d4ef69b4 Implemented : Add sub-screen decorator DetailScreenDecorator and EmbeddedDecorator
(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
2021-06-22 10:19:56 +02:00
fehnomenal d288e12030 Make latitude and longitude numeric fields for correct comparisons (#220) 2021-05-29 12:07:19 +02:00
Jacques Le Roux fec6559e7b Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is related to this question from Daniel at
https://github.com/apache/ofbiz-framework/pull/220

I couldn't figure out how to configure OFBiz with my Google API key so ended up
temporarily patching
themes/common-theme/template/includes/GeoLocation.ftl line 44 with my key.
Line 44 looked similar to:
<script src="https://maps.googleapis.com/maps/api/js?key=secret_google_api_key" type="application/javascript"></script>

Is there a way to configure ofbiz with the API key?

Disclaimer: w/o a not free "Google API key" I was not able to test, will ask
Daniel...
2021-05-29 12:06:16 +02:00
Jacques Le Roux 45f50c910d Improved: Handle remaining checkstyle errors (OFBIZ-12169)
This handles the "'(' should be on the previous line?" rule of MethodParamPad

Actually not completely, because there are still some cases that can't be
handled by changing code, notably when a casting is necessary. I believe there
is an error in checkstyle code. I'll discuss that in dev ML before sending
checkstyle team a report.
2021-05-04 10:34:52 +02:00
Jacques Le Roux 643b9c7ea7 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 controller, it should be enough.

The tests pass
2021-03-29 13:13:53 +02:00
Jacques Le Roux 76d6382c81 Fixed: addImageForProduct fails (OFBIZ-12211)
The addImageForProduct  process is not directly uploading a file but renames it
before.So there is a hyphen, and possibly a pair or parenthesis in case of
duplicate files, added to the file name.

In this commit I have also added the possibility to use underscores and spaces
in the original filename
2021-03-29 11:07:20 +02:00
Jacques Le Roux 36f95557b7 Improved: Secure the uploads (OFBIZ-12080)
Improves the error message for the file name part
2021-03-24 19:14:32 +01:00
Jacques Le Roux e988dd4efd Improved: increases some French labels length
They fits with new enlarged second menu in Rainbow Stone
2021-02-21 12:31:13 +01:00
Michael Brohl 29bf0a040a Merge branch 'trunk' into OFBIZ-12169_Handle_remaining_checkstyle_errors 2021-02-13 11:26:01 +01:00
Deepak Dixit 782bddb729 Fixed File Resource not found console warning related to already removed data files 2021-02-12 12:55:31 +05:30
Wiebke Pätzold 82a15c70e3 Improved: Removed inner assignments (OFBIZ-12169) 2021-02-10 11:38:04 +01:00
Wiebke Pätzold b65be41fc7 Improved: if else construct must use parentheses (OFBIZ-12169) 2021-02-09 09:11:48 +01:00
James Yong ad0211ab2d Improved: Display last-visited-time popup after login (OFBIZ-12148) (#266)
Improved: Display last-visited-time popup after login (OFBIZ-12148)

To allow users to know of any unauthorised access to their accounts.

Thanks: Michael for review
2021-02-08 00:04:29 +08:00
Sebastian Berg a33ac5cff3 Improved: Convert EmailServices.xml mini lang to groovy (OFBIZ-11868) 2021-02-01 16:51:00 +01:00
Wiebke Pätzold b57f4d0845 Improved: Spelling error in the German translation of Slovakia
(OFBIZ-12161)
2021-01-28 18:08:15 +01:00
Jacques Le Roux 20e7fc5435 Fixed: Creating a new Customer create a wrong record in CommunicationEvent (OFBIZ-12142)
In https://markmail.org/message/pf3d3qyjfucicbj7 I initially answered:
In demo data 13 parties use <<infoString="ofbiztest@example.com">> as in
<ContactMech contactMechId="FRA01" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
This one is loaded last. Rather
<ContactMech contactMechId="Company" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
which is the 1st one, should be loaded last.

A better solution is to use "ofbizsupport@example.com" in EmailServices.xml

Indeed, fortunately the Company party also uses this infoString and using it in
EmailServices.xml does not affect the integration test and should not affect
other parts of the (only) demo data

Thanks: Emad Radwan for opiniated report :) and Pritam Kute for issue analysis
2021-01-18 19:41:08 +01:00
Nicolas Malin 7165768251 Implemented: Add a framework method to get main webapp menu with the webapp name
(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
2021-01-15 08:56:23 +01:00
James Yong 9c7dc7b877 Improved: Rename MultiBlockHtmlTemplateUtil to ScriptLinkHelper (OFBIZ-12134)
Rename + Refactor
2021-01-13 09:26:42 +08:00
Suraj Khurana cc17887980 Improved: Added support to calculate distance between two geo points.
(OFBIZ-11901)
Thanks Ravi Lodhi for review and discussion.
2021-01-09 13:37:21 +05:30
Jacques Le Roux ec2b84341e Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
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
2020-12-18 11:08:32 +01:00
Jacques Le Roux 17eb2e4cf7 Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)
Same for sub-hyperlink
2020-12-11 16:52:04 +01:00
Jacques Le Roux 5fa312cfb9 Fixed: Secure the uploads (OFBIZ-12080)
Improves the labels names and format comment in LayoutEvents.java

I backport to ease later works...
2020-12-06 11:16:44 +01:00
James Yong cfabbc9b74 Fixed: jquery.ui.datepicker-en.js does not exist (OFBIZ-12071)
Fixed for Jquery DatePicker
2020-12-05 19:24:09 +08:00
Jacques Le Roux e73616caf1 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.
2020-12-01 10:16:04 +01:00
James Yong 283752fd26 Fixed: jquery.ui.datepicker-en.js does not exist (OFBIZ-12071)
Default language file specified for DateTime doesn't exist in the project i.e.
/common/js/jquery/ui/i18n/jquery.ui.datepicker-en.js

Changed to /common/js/jquery/plugins/datetimepicker/i18n/jquery-ui-timepicker-en.js
2020-11-28 21:26:47 +08:00
Deepak Dixit 9cf1d78555 Improved: Update IND Geo data as per 2020-11-24 notification (#240)
- Deletion of Union territory IN-DD, IN-DN;
- Addition of Union territory IN-DH;
- Correction of spelling for IN-AR, IN-BR, IN-CH, IN-CT, IN-DH, IN-GJ, IN-HP, IN-HR, IN-JH, IN-JK, IN-KA, IN-LA, IN-MH, IN-ML, IN-NL, IN-RJ, IN-TG, IN-TN, IN-UT;
2020-11-28 12:24:39 +05:30
James Yong bc5b0d595c Improved: Load language js for date.js only when required (OFBIZ-12064)
Tested on
1) date time field at /ordermgr/control/orderentry and
2) date find field at /ordermgr/control/findreturn
2020-11-27 21:51:35 +08:00
Jacques Le Roux 17de4f6e07 Improved: Added multiple "es" and "es-MX" values. Added Mexican Federal Holidays
Fixed: Mexican States Abbreviations

In GeoData_MX.xml abbreviations of the Mexican States were wrong and
"Mexico City" state was labeled as County, which is not.

In CommonUiLabels.xml and CommonEntityLabels.xml were added some missing values
to "es" and "es-MX" languages

In ServiceDemoData.xml were added the Mexican federal holidays under the
temporal expression "MX_FED_HOLIDAYS"

Thanks: Zottacko WallyMan
2020-11-18 17:05:41 +01:00
James Yong 0e40d9f091 Improved: Open Screen file from browser (OFBIZ-12038)
Allow the opening of screen definition that contributed to the web page from the browser. Command to open the file is set at widget.dev.cmd.openSourceFile.

Thanks Jacques for review.
2020-10-08 15:28:43 +08:00