Commit Graph
46 Commits
Author SHA1 Message Date
SebastianEcomify fabbba342c Fixed: Addressed log issues caused in FindGeneric.groovy (OFBIZ-12193) (#285)
The backportet Version of searchForm in FindGeneric.groovy was to
advanced for the 18.12 Version. The form was changed back to its
previous version and the changes causing the view Error in ViewEntities
have been worked into it
2021-03-12 11:01:44 +01:00
Jacques Le Roux 82c2258247 Fixed: webtools/control/threadList no longer works on trunk (only) (OFBIZ-12195)
It works if we downgrade Freemarker to 2.3.28 as in R18 and even using 2.3.29,
not 2.3.30.

Handles things at the Groovy level, ie put in context, rather than creating
in Freemarker template.

It's backported, even if it's not a pb but in trunk, because it's a (low)
security issue.
2021-03-12 08:59:08 +01:00
Jacques Le Roux d61fb40e56 Fixed: Cant search ViewEntity InventoryItemDetailForSum (OFBIZ-12193)
Go to Entity Engine - >
search entity InventoryItemDetailForSum (view entity) ->
search for entries -> an error message is shown.

A SQL exception occurred running the service executeFind

Thanks: Sebastian Berg

Conflicts handled by hand
 framework/webtools/groovyScripts/entity/FindGeneric.groovy
2021-03-08 10:09:45 +01:00
Michael Brohl 177b96300f Improved: Replaces ModelInduceFromDb with widgets (OFBIZ-6510)
This is a manual backport of the related two commits in trunk with minor
changes to fit the r18.12 codebase.
2021-02-11 21:12:26 +01:00
Jacques Le Roux 792f45773f 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:08:53 +01:00
Jacques Le Roux 0b26b9155f 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:56:52 +01:00
Pawan Verma 8e2bb295cf 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:15 +05:30
Jacques Le Roux 9fa3dbe1ea Revert "Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk"
This reverts commit 0add8bedbc.
2020-04-05 10:04:15 +02:00
Jacques Le Roux 0add8bedbc 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

Conflicts handled by hand
RequestHandler.java
2020-04-04 18:33:11 +02:00
Jacques Le Roux e78b29fe14 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 09:43:08 +01:00
Jacques Le Roux 4b2db718f9 "Applied fix from trunk for revision: 1866986"
------------------------------------------------------------------------
r1866986 | jleroux | 2019-09-16 10:20:46 +0200 (lun. 16 sept. 2019) | 4 lignes

Fixed: Path Traversal in webtools/control/FetchLogs and ViewFile
(OFBIZ-11196)

Fixes a typo which was crashing webtools/control/LogView
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866987 13f79535-47bb-0310-9956-ffa450edef68
2019-09-16 08:21:34 +00:00
Jacques Le Roux 62b4b36d88 "Applied fix from trunk for revision: 1866920"
------------------------------------------------------------------------
r1866920 | jleroux | 2019-09-14 10:19:18 +0200 (sam. 14 sept. 2019) | 18 lignes

Fixed: Path Traversal in webtools/control/FetchLogs and ViewFile
(OFBIZ-11196)

These are not really path traversal issues. 

We can't solve them using the traditional way to fix path traversal issues 
(ie normalising path). Because Fetchlogs and ViewFile are actually reading 
files and if you have the right to read these files then nothing will prevent 
you to read them. 

The problem is more what those requests are supposed to do. 
Fetchlogs is supposed to read a log in the log dir 
and ViewFile is supposed to read a file containing labels 
(ie either an XML or Properties file).

So the solution is to allow these requests to only do what they are supposed to 
do. This is what is done in ViewFile and FetLogs Groovy files.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866921 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 08:21:21 +00:00
Jacques Le Roux 6207c23328 "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/release18.12@1862208 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 12:03:53 +00:00
Jacques Le Roux 371fc2f9c6 "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/release18.12@1862047 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 09:48:27 +00:00
Suraj Khurana d63e7d20ec 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/release18.12@1859916 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:27:34 +00:00
Nicolas Malin 7648f27f75 Fixed: On FecthLogs screen order the file log list drop-down to help the search
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840789 13f79535-47bb-0310-9956-ffa450edef68
2018-09-13 08:34:39 +00:00
Deepak Dixit ae496e98c1 Improved: Show title information on Entity Data Maintenance page (OFBIZ-10207)
Thanks Aditya Sharma for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824659 13f79535-47bb-0310-9956-ffa450edef68
2018-02-18 10:23:12 +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
Michael Brohl 2eaa1fcd78 Improved: Label Manager: Have totals shown at the top of the search
results.
(OFBIZ-6457)

Thanks Pierre Smits for reporting and providing the initial patch,
Aditya Sharma for the revised patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812479 13f79535-47bb-0310-9956-ffa450edef68
2017-10-18 09:05:42 +00:00
Jacques Le Roux e8a3c6f3d5 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

In many Java and Groovy files we have auto generated catch blocks or empty catch 
blocks. 
To avoid such exception swallowing this should be improved to at least log the 
error and also return error in case of service.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1807162 13f79535-47bb-0310-9956-ffa450edef68
2017-09-03 19:27:49 +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
Jacques Le Roux 7f350f3ff5 No functional change
Fixes typos reported by Renuka Srishti on dev ML


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805936 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 16:27:58 +00:00
Jacques Le Roux b4bfcee1b9 Fixes a typo reported by Renuka Srishti on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805775 13f79535-47bb-0310-9956-ffa450edef68
2017-08-22 15:04:24 +00:00
Jacques Le Roux 2f66c248e6 No functional change,
In 3 places we use uiLabelMap.get("xxxxx") instead of uiLabelMap.xxxxx which 
does essentially the same when there is no default parameter passed to get()
http://mrhaki.blogspot.fr/2009/11/groovy-goodness-get-value-from-map-or.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805548 13f79535-47bb-0310-9956-ffa450edef68
2017-08-20 12:11:39 +00:00
Nicolas Malin 703148c27e Implemented: Manage deprecated service in the ModelService (OFBIZ-9558)
When you want to remove a service we add a new xml element <deprecated/> that you can put on the service definition like this

<service name="oldService" ...>
    <deprecated use-instead="newService" since="theReleaseXXX">The reason to move it as deprecated</deprecated>
    <implements service="newService"/>
</service>

A deprecated service generate a warning log each time it is called
When you navigate on webtools a deprecated service is strike in the service list and display deprecated reason on the service definition detail page.

Thanks to Scott, Deepak, Taher and Jacques for sharing on this subject

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804786 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 12:41:22 +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
Jacques Le Roux 71be53347d Fixes: webtools label search widget issue
(OFBIZ-8315)

go to https://localhost:8443/webtools/control/SearchLabels
click find to show entries
click on a link in the listing
shows error page...

This bug was introduced while working on OFBIZ-8154 (still WIP)

Thanks: Wai for report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761940 13f79535-47bb-0310-9956-ffa450edef68
2016-09-22 12:40:37 +00:00
Jacques Le Roux 2cfb3c4a1b Fix for "The entity description labels are considered not used by the Label Manager"
OFBIZ-8154

We had 5237 "Not Used Labels". I wondered if they were all real. There is actually a huge bunch of *.description.* labels and alike which are certainly used, notably automatically by the widget dropdowns. 
This commit removes them from the "Only Not Used Labels" result. Net result: from 5237 to decent 2188 "Not Used Labels", this begins to be useful...

It only begins because I removed from the "Not Used Labels" a number of other cases similar to the obvious *.description.* labels. those are
.transitionName.
.partyRelationshipName.
.geoName.
.categoryName.
.ProductPromoCondition..
.ProductPromoOperatorEquality..
.Example. // TODO check all is used here

But a number of others need to be verified, at least:
FormFieldTitle_???
FieldDescription.ProductStore.???
FieldDescription.ProdCatalog.???
HumanResServices.???
.portalPageName.???
ProductShipmentUomAbbreviation_???
ProductStoreGroup.productStoreGroupName._NA_???
TemporalExpression_???

Also to look at:
FormFieldTitle_timesheetPartyId x2
Labels after WorkEffortWorkEffortIdEmpty

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760139 13f79535-47bb-0310-9956-ffa450edef68
2016-09-10 09:27:54 +00:00
Deepak Dixit 9c5a6b2ed2 (OFBIZ-7975) Removed unused import from TestSuiteInfo groovy file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758274 13f79535-47bb-0310-9956-ffa450edef68
2016-08-29 18:01:46 +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
Nicolas Malin 7db2a45bd0 correct typo error on commit r1755302 to resolve the ofbiz log dir when isn't end by /
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756952 13f79535-47bb-0310-9956-ffa450edef68
2016-08-19 17:37:40 +00:00
Nicolas Malin 184d60206a Currently we have two methods for display log in OFBiz throught webtools :
* https://localhost:8443/webtools/control/LogView
* https://localhost:8443/webtools/control/FetchLogs
Each method use the same line rendering and the difference is : LogView display only runtime/logs/ofbiz.log (or you can surcharge it vith debug.properties) and FecthLogs list all file name ofbiz* present on runtime/logs/ofbiz.log and offert the possibility to search only line that macth a string.

I review the code to use only one script (remove LogView.groovy) and improve following points :
* Optimise the FetchLog.groovy to display with same velocity a file with or without string chain filtering
* Add a property to change the root log directory. Under linux we use /var/log/ofbiz/
* Add a regExp to match the file name of file present in the directory. Helpful when you want to see error.log
* Complete debug.properties with comment for describe example for new properties

And last point, add refresh button on the end page to reload the log without lost your state on the page.
Related issue OFBIZ-7944

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755302 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 12:05:48 +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
Jacopo Cappellato e0da901504 OFBIZ-7760 Removed from UtilCache the ability to persist entries in the file system.
This feature has been contributed a long time ago as an experimental feature but never really matured into a production ready artifact: since it was contributed, no users asked about how to use it, or tested it, or reported bugs or enhancement requests.
More importantly, the feature has always been disabled in the OFBiz framework (i.e. the widget code and the entity engine code were not using it).
This removal should not impact our user base; however, after the removal, an entry to the Attic will be created to keep track of it and to make it easier, to interested users, to get this code, improve it (e.g. by making it dependent on a live external jar, for example MapDB instead of JDBM) and possibly contribute it back to the project.
The most compelling reason for its removal is that the feature was based on a snapshot, unreleased version of JDBM, which is now a mostly dead project: for licensing reasons we are no more allowed to bundle jars in our releases. Additionally, having code that relies an old jar from a no more active project represents a maintenance issue for the community.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751817 13f79535-47bb-0310-9956-ffa450edef68
2016-07-07 17:00:05 +00:00
Pranay Pandey 517138623b [OFBIZ-7575] Fixed styling issue on Logs in LogView, as none was being applied.
As per updated code now-
INFO will be shown in Green color
WARNING will be in bold Blue color
ERROR will be in Red color along with border
DEBUG will be in Grey color
Thanks Swapnil M Mane for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750336 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 13:53:24 +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 d9a8278ae6 (OFBIZ-7245) Renamed groovy file in upper camel case as per best practices
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747850 13f79535-47bb-0310-9956-ffa450edef68
2016-06-11 06:12:27 +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