Commit Graph
24 Commits
Author SHA1 Message Date
Jacques Le Roux 72e2eacef8 Fixed: Groovy Program sandbox bypass (OFBIZ-12305)
This much increases the current security by creating SecuredUpload::isValidText
and call it from ProgramExport.groovy

This said I agree with thiscodecc that a better solution would be to use a
Groovy sandbox, and not only in ProgramExport.groovy.

I had a quick glance at a such solution. Unfortunately as Cédric Champeau reports
at https://melix.github.io/blog/2015/03/sandboxing.html and unlike thiscodecc
suggest there are no "mature solutions on the market".

Nevertheless I'll have a deeper look at an OFBiz specific Groovy sandbox
solution.

Somehow related: I'll also soon extract the list of words used in
SecuredUpload::isValidText in a deniedWebShellWords property in security.properties

Thanks: thiscodecc for report

Conflicts handled by hand
  framework/webtools/groovyScripts/entity/ProgramExport.groovy
2021-09-17 18:49:27 +02:00
Jacques Le Roux 28a6d4391a Fixed: Prevent arbitary file write using webtools/control/EntitySQLProcessor. (OFBIZ-12057)
Shuibo Ye <shuiboye@gmail.com> reported a possible arbitary file write using
webtools/control/EntitySQLProcessor.

    In the "SQL Command" part, I create a table and insert some strings and
    export the table to a file one sentence at a time.
    PoC: CREATE TABLE "test" (string VARCHAR(80))
    INSERT INTO "test" (string) VALUES ('<%= system.getProperty("user.dir") %>')
    call SYSCS_UTIL.SYSCS_EXPORT_TABLE(null,'test','.\framework\webtools\webapp\webtools\default.jsp',null,'*',null)

    After executing the three sentences,I successfully write the file and its url
    is https://localhost:8443/webtools/default.jsp.

I fixed it preventing execution on SYSCS_UTIL.SYSCS_EXPORT_TABLE and JSP, more
could be added if necessary
2020-11-16 14:09:16 +01:00
Jacques Le Roux 6bf785654a Improved: Prevent possible post-auth RCE from webtools/control/ProgramExport (OFBIZ-12055)
This was reported to the security team by Shuibo Ye <shuiboye@gmail.com>.
We did not create a CVE because it's a post-auth "vulnerability"

Thanks: Shuibo Ye
2020-11-14 11:57:15 +01:00
Pawan Verma 5eadb77a88 Incorrect column alias in EntitySQLProcessor for sql query working with mysql
(OFBIZ-11573)

More details: Method getColumnLabel returns the designated column's suggested title for use in printouts and displays. Method getColumnName returns the designated column's name.

Thanks: Suraj and Jacques for the review.
2020-04-28 10:57:56 +05:30
Jacques Le Roux 84e102a6a1 Revert "Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk"
This reverts commit 27e57522b1.
2020-04-05 10:05:16 +02:00
Jacques Le Roux 27e57522b1 Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk
Because of GitHub message on PR56:
This branch cannot be rebased due to conflicts

Much Conflicts, but that should be OK
2020-04-04 18:41:14 +02:00
Jacques Le Roux e3b8ec5e84 "Applied fix from trunk for revision: 1862207"
------------------------------------------------------------------------
r1862207 | jleroux | 2019-06-27 14:03:21 +0200 (jeu. 27 juin 2019) | 8 lignes

Fixed: Export XML data, ,o proper error message displayed if user misses to 
select entities 
(OFBIZ-11125)

No Proper error message is displayed if user misses to select entities from the 
list, and throw error message

Thanks: Jayansh Shinde
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862209 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 12:03:55 +00:00
Jacques Le Roux 319d7f7626 "Applied fix from trunk for revision: 1862046"
------------------------------------------------------------------------
r1862046 | jleroux | 2019-06-25 11:44:54 +0200 (mar. 25 juin 2019) | 1 ligne

Reverted: it was not supposed to be committed, "wrong button" while backporting
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1862048 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 09:48:29 +00:00
Suraj Khurana 8ae9012031 Applied fix from trunk for revision: 1859915
===

Fixed: Enable entity timestamp fields.
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.

Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1859917 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:28:36 +00:00
Deepak Dixit 0a652486ff Fixed: Fixed typo done at r#1818003
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818606 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 18:38:54 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Deepak Dixit bbd6590816 Fixed: Used entityName instead of null while using FormFactory.readFormDocument method, as this parameter is used to prepare formLocationCache, and its causing issue to view different entity from webtools. Now form will be cached based on enittyName#formName so it will working fine for all possible scenaraio
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817693 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 11:07:07 +00:00
Deepak Dixit 1cc65c1d2b Fixed: Fixed typo in FindGeneric.groovy, also removed the visualThemeSetId for common theme. Now common theme will be display on backend visual theme popup. (OFBIZ-9138)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806216 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 19:04:11 +00:00
Nicolas Malin 10af80b1a8 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step these step break all the UI
#2 The MacroScreenRenderer class now resolve the macro ftl library location from the model theme
The widget.properties lost all definition now managed by the theme definition

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806140 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 09:36:04 +00:00
Deepak Dixit 7bacf44bd4 Improved: Inconsistent String Comparisons, Applied framework groovy patch from jira issue. (OFBIZ-9254)
I found an inconsistency in the code for string comparison statusId.equals("PRUN_COMPLETED") whereas it should be written as "PRUN_COMPLETED".equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.

Thanks Devanshu Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795342 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 17:20:24 +00:00
Jacques Le Roux 8108bf3c8c Improved: When searched from FindGeneric page it looses entityName from the url
(OFBIZ-9341)

Steps to generate:
1. Go to webtools (https://localhost:8443/webtools/control/main)
2. Click on "Entity Engine" (https://localhost:8443/webtools/control/entitymaint)
3. Click on any entity to view (https://localhost:8443/webtools/control/FindGeneric?entityName=AccommodationClass)
4. Click on "search" button (https://localhost:8443/webtools/control/FindGeneric)

When the search is hit, it looses the entityName from the url as it used to 
happen in previous releases and according to the pattern on other search pages.

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1793254 13f79535-47bb-0310-9956-ffa450edef68
2017-04-30 09:54:58 +00:00
Nicolas Malin 5be9a2f2ad Improved: Improve FindGeneric entity screen with xml form (OFBIZ-9217)
Replace the current groovy and ftl form rendering by a dynamic call to screen xml with build the xml form by analyse the entity
The find operation is now realize by the perfomFind service

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1783427 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 17:00:31 +00:00
Arun Patidar 2bfc816e9b Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Nicolas Malin 177c83ec1d Performance tests screen has been broken by a bad UtilCache call. Thanks to Pawan Verma for this correction throw OFBIZ-7989.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757955 13f79535-47bb-0310-9956-ffa450edef68
2016-08-27 07:07:33 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Arun Patidar a91b9edae9 Applied patch from ticket - OFBIZ-7339 - Replace EntityUtilProperties getPropertyValue method with correct method calls. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749882 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 13:10:51 +00:00
Deepak Dixit 543dd8e488 (OFBIZ-7221) Relocate .groovy files in the framework/webtools component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747755 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 17:16:22 +00:00