Commit Graph
1980 Commits
Author SHA1 Message Date
bjugl 4ae01b94f1 Improved: Replace ELRTE plugin with Trumbowyg (OFBIZ-10093) (#425)
Thanks: Jacques for inspiration and guidance, Aditya Sharma for sharing
thoughts and visions and Ingo Richter for finding this gem.

- changed grid 'EditProductPriceRulesCondition' list-name to reflect
correct list
2022-01-07 12:16:27 +05:30
Pierre Smits 7b492abd89 Improved: Have configuration options for Content (OFBIZ-6670) (#398)
Improved: Have configuration options for Content (OFBIZ-6670)

The configuration of an OFBiz is determined by 2 aspects:
configuration settings required to successfully start the implementation
configuration settings required to have component functions work properly
The latter involve default choices for various functions to cater to the usability of business processes (and therefore screen/forms and/or screens/templates.
Several of these configuration settings are already loaded into the SystemProperty table in the underlying RDBMS, to enable adjustments of the systemPropertyValue while the implementation is in use. While it is not expected that these settings change often, it is possible that they are required to be changed during the lifespan of the company/organisation.
However, it should not be required to go through a deployment process of regarding such changed configuration settings in the OFBiz production instance (which most - if not all - companies/organisations require when files are changes).
Having all configuration settings of components in the SystemProperty table enhances the usability of OFBiz allowing system administrators to adjust the value(s) of system property records while the instance keeps running.

added: SystemProperty records in ContentSystemPropertyData.xml
Modified:
ofbiz-component.xml: reference of ContentSystemPropertyData.xml to load at seed loading moment

added:  missing SystemProperty records in ContentSystemPropertyData.xml

Thanks to Jacques for the review
2021-12-12 14:07:53 +01:00
Jacques Le Roux 699c30ed85 Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes possible null dereferencings

For FormRenderer.java it was accidentally removed for OFBIZ-12422
2021-11-30 19:03:24 +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 2489381f7f Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Adds unused hashCode method to *ArtifactInfo and PackingSession classes
Makes final CmsEvents, ContactMechWorker and PartyWorker classes

There are no longer any checkstyle issues
2021-10-17 15:59:35 +02:00
holivier 874e2dd03c Fixed: online help links don't get where they should (OFBIZ-12328)
Correction for content and accounting AR & AP
2021-09-28 20:54:13 +02: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
Wiebke Pätzold 5b1552cfef Improved: Convert ContentPermissionServices.xml mini lang to groovy
(OFBIZ-11446)

Also change the reference in DataResourcePermissionServices.xml for checkOwnership
2021-09-19 20:06:17 +02:00
Jacques Le Roux 71dbb3c824 Fixed: CVE-2021-37608 vulnerability bypass (OFBIZ-12307)
Fixes a number of issues I spotted while working on OFBIZ-12305 in relation with
OFBIZ-12055

The last change I made for OFBIZ-12305 was incomplete, the files could not be
checked by SecuredUpload because they did not exist! This concerns
ImageManagementServices, DataServices, FrameImage and ProductServices classes.
I used Files::createTempFile to fix that.

Also fixes a bug in SecuredUpload where I reversed the check on
fileToCheck.length in Windows case. I also added a comment, Windows 10 now
allows more length (need an OS parameter change though)

Finally, creates public SecuredUpload::isValidText to be used in OFBIZ-12305
2021-09-17 11:44:21 +02:00
Nicolas Malin 85c6220298 Improved: Convert updateSimpleTextContent service from mini-lang to groovy DSL (OFBIZ-11375)
Thanks to vivek singh bisen for initiate the patch
2021-09-14 14:50:52 +02:00
Nicolas Malin 46d53b513e Improved: Convert findAssocContent service from mini-lang to groovy DSL (OFBIZ-11369)
Thanks to Prakhar Kumar
2021-09-14 14:24:22 +02:00
Nicolas Malin dfb75fbcc7 Improved: Convert createSimpleTextContent service from mini-lang to groovy DSL (OFBIZ-11374)
Thanks to Sourabh Punyani
2021-09-14 14:04:41 +02:00
Jacques Le Roux 9ea7c6d524 Fixed: CVE-2021-37608 vulnerability bypass (OFBIZ-12307)
Safer completing solution as recommended by weinull orz <weinull@outlook.com>
Previous commit was OK, but better be safe than sorry ;)

Also forgot to commit the DENIEDFILEEXTENSIONS checkstyle change last time

Thanks: weinull orz for the the right suggestion (done 2021-08-13)
2021-09-03 16:49:11 +02:00
Nicolas Malin 92d3625153 Fixed: remove unnecessary quote on groovy map 2021-08-18 09:10:39 +02:00
Nicolas Malin bdd5673fe2 Fixed: Clean groovy file ContentServices.groovy
No functional change :
 * remove case syntax
 * use OFBiz dsl
 * condense map creation, entityCondition by builder
 * add typage to help ide and compilation

Fixed to bad engine on service createDownloadContent and updateDownloadContent after the minilang to groovy migration
2021-08-17 17:45:45 +02:00
Jacques Le Roux 4fe5ded7fe Documented: give some information on how to quickly override security in content 2021-07-22 12:33:36 +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 29705efa65 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 15:51:32 +02:00
Aditya Sharma e97f45c381 Fixed: removed unused asmselect files and unused variable asm_asmListItemPercentOfForm (OFBIZ-10113)
asm select library is already replaced with select2 library, but the library files still exist in code base unused.
asm_asmListItemPercentOfForm varaible was used to set the width of the selected items which were displaced distictly from select fields. With select2, the selected items display inside the input field so it is no more needed

Thanks Jacques Le Roux for reporting it
2021-05-12 11:57:54 +05:30
Deepak Dixit 00b92f4a25 Removed extra space from eecas.xml file 2021-03-22 15:22:10 +05:30
Jacques Le Roux 62031a4fbb Fixed: When creating blog or forums, it failed to save (OFBIZ-10426)
Create a blog or forum and click save button, it will popup with error message.
The reason is because the mapKey passed from front end cannot be handled by the
service. The solution is not to pass the mapKey to the service.

Steps:

1) navigate to content/control/blogContent?blogContentId=BLOGROOTBIGAL

2) create a new article  content/control/EditBlogArticle?blogContentId=BLOGROOTBIGAL

Thanks: Jason Hao for report and Aman Mishra for the fix
2021-03-02 19:49:04 +01:00
Michael Brohl 69c62f5f00 Merge changes for PR #267 due to conflicting changes in trunk (OFBIZ-12169) 2021-02-15 17:15:18 +01:00
Jacques Le Roux a2dac5482c Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
[...] having more important apps in 1st places would be better [...]
the feature should be easily changed by custom projects [...]
documentation for that would be enough.

This 1st step sorts the applications and webtools. I believe webtools should not
be secondary but that needs to be discussed with other options.
2021-02-14 21:11:58 +01:00
Jacques Le Roux da134243f7 Fixed: issue put in with r1160964 (9 years, 5 months ago)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:12:00 +01:00
Jacques Le Roux 432c7bde98 Fixed: Use from-field pattern instead of value=${***} pattern in 'set' element (OFBIZ-9607)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:12:00 +01:00
Michael Brohl 662a3f9d1c Improved: Remove Compdoc functionality from content manager
(OFBIZ-10476)
2021-02-13 17:33:05 +01:00
Wiebke Pätzold fab0783722 Improved: Used uppercase 'L' as suggested by checkstyle (OFBIZ-12169) 2021-02-10 12:44:44 +01:00
Wiebke Pätzold 03960053a8 Improved: Replaced '.*' import form (OFBIZ-12169) 2021-02-09 11:30:18 +01:00
Wiebke Pätzold b65be41fc7 Improved: if else construct must use parentheses (OFBIZ-12169) 2021-02-09 09:11:48 +01:00
Wiebke Pätzold 2fe5e15a83 Improved: Adds newline at the end of file (OFBIZ-12169) 2021-02-08 16:31:13 +01:00
Benjamin Jugl f5788b2a81 Improved: Converts DataServices.xml to Groovy. (OFBIZ-11469) 2021-02-01 17:08:46 +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
Daniel Watford 3795727ea2 Improved: MacroFormRenderer refactoring of label, display and text
fields

(OFBIZ-11900)

New RenderableFtl elements to represent pre-rendered FTL strings and FTL
macro calls. RenderableFtl elements are able to render themselves to
strings which are processed as an FTL template by the FtlWriter class.

For labels, display fields and text fields, MacroFormRenderer no longer
generates FTL to write to a template itself, but instead calls
RenderableFtlFormElementsBuilder to create corresponding RenderableFtl
elements which are then processed by FtlWriter. This is a WIP to reduce
complexity in MacroFormRenderer.
2021-01-12 10:40:58 +00:00
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 fdeedf23ee Improved: Adds the HTML <input> accept Attribute in form widgets and Freemaker templates (OFBIZ-12049)
As explained at
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
this is only an help for the users (ie not a security feature), but an
appreciable one easy to implement.

Here we start with website/WebSiteCMSContent.ftl
Also add some missing file extensions
2020-12-07 18:45:25 +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
Jacques Le Roux a0e8a23a18 Fixed: Secure the uploads (OFBIZ-12080)
validateUploadedFile() fixes another case reported in August by Harshit
2020-12-06 10:20:57 +01: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
Nicolas Malin 12162a2a9c Fixed: Create a blog article failed to link each contents
(OFBIZ-12075)

When you create a blog article with screen https://localhost:8443/content/control/EditBlogArticle?blogContentId=${blogId} by default you can create an article with a summary, an image and a long text.

After the creation all content related to this article was created by impossible to display this article correctly. The problem come from the contentAssoc of each relation where the mapKey isn't populate.

The root come from the conversion to entity-auto for the service createContent, where some seca are present and use some field to create some relation with attribute not present on a content (like the field mapKey)

To correct this I the simple way is to authorize these fields, and think for the future how do better.
2020-11-30 09:17:21 +01:00
holivier 98631771aa Documented: Synchronize wiki page End User Documentation (OFBIZ-12059)
- Add facility.adoc with only overview
- Correction for Content Management title
- in General glossary, add link to main components
- Complete Order management overview
- Add a short overview for Party
- Ordered applications in user-manual in alphabetic order
2020-11-16 17:00:48 +01:00
Jacques Le Roux 2fe76bead8 Improved: Misc trivial changes done while working on others issues 2020-11-11 20:43:59 +01:00
Jacques Le Roux 07cb19c0b1 Improved: Reflected XSS in content component (OFBIZ-11840)
Adds some more case and explains things better, no backport
2020-11-11 20:30:11 +01:00
holivier 4a41f0fde5 Documented: migration to help system using asciidoc files (OFBIZ-11587)
commit correction for <Remove all related help docbook files>
* reAdd a contentDocData for main contentId and portletCategory
* remove from ofbiz-component of each application line about helpData which are removed
2020-10-27 11:20:09 +01:00
holivier 302bc0eb15 Documented: migration to help system using asciidoc files (OFBIZ-11587)
Remove all related help docbook files
2020-10-26 17:34:03 +01:00
Suraj Khurana 1ff8957032 Improved: Corrected some spacing issues in code, where there are extra white spaces, this will fix some checkstyle issues in applications component.
(OFBIZ-12022)
2020-09-26 14:18:28 +05:30
Suraj Khurana b3fcbeedba Improved: Make data members of class as private and added accessor methods for the same, also corrected occurences of the same in applications component.
(OFBIZ-11963)
Also made some related checkstyle code enhancements. Thanks Jacques for review.
2020-09-12 12:09:03 +05:30
Suraj Khurana 5f021ce06b Improved: Corrected line is longer than 150 characters checkstyle issues in applications component.
(OFBIZ-11921)
Also fixed some other extra space and naming related checkstyle issues observed.
Thanks Jacques for review.
2020-09-04 12:24:14 +05:30
Suraj Khurana ca9fa4fba4 Improved: Corrected line is longer than 150 characters checkstyle issues in framework and applications component.
(OFBIZ-11921)
Also fixed some extra spaces and naming conventions related checkstyle issues.
Thanks Jacques for review.
2020-08-31 19:54:54 +05:30
Akash Jain 66a76ffd5a Improved: Fix Literals comparisons with variable to avoid NPE (OFBIZ-11929)
Thanks, Devanshu Vyas for your contribution.
2020-08-30 17:20:23 +05:30