Commit Graph
8 Commits
Author SHA1 Message Date
Jacques Le Roux 2b921e958a "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/release17.12@1866988 13f79535-47bb-0310-9956-ffa450edef68
2019-09-16 08:21:35 +00:00
Jacques Le Roux bb2f56a0d0 "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/release17.12@1866922 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 08:21:23 +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 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
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
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