Commit Graph
20 Commits
Author SHA1 Message Date
Jacques Le Roux 823cc0bf99 Fixed: streaming large content cause out of memory exception.
(OFBIZ-10133)

When ofbiz streams a large content (eg. video file), get out of memory exception.

To reproduce the issue see the Jira

jleroux: I just removed final for bufferSize, I see no needs for that local
variable

Thanks: Wai for the patch Michael for the discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821036 13f79535-47bb-0310-9956-ffa450edef68
2018-01-12 21:59:22 +00:00
Jacques Le Roux e7cdb8a30d Implements "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
All tests passes and the normal use of OFBiz seems to work

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745525 13f79535-47bb-0310-9956-ffa450edef68
2016-05-25 18:02:23 +00:00
Jacques Le Roux 6d5dd1c5ba Things got totally wrong with r1742196 which contained much more than expected.
This reverts things which should not have been committed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1742197 13f79535-47bb-0310-9956-ffa450edef68
2016-05-03 21:03:11 +00:00
Jacques Le Roux 31ef1f9186 "Continue the work on the form widget grid element" - https://issues.apache.org/jira/browse/OFBIZ-7029
Completes in screens the changes done in forms at r1741873. I then replaced few form lists by grids, where it was possible to do it with regexp.
Also complete StatsForms.xml to use only grids and "searchList" form in ecommerce ContentForms to NOT use grid (not called in screen)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1742196 13f79535-47bb-0310-9956-ffa450edef68
2016-05-03 20:50:10 +00:00
Jacques Le Roux 6ebc90e694 Implements "Can not display product category name in Unicode." https://issues.apache.org/jira/browse/OFBIZ-6739
Rerported by Thanakrit Wongyued
I found problem to display product category name in Unicode (Thai UTF-8) . The problem is services in CategoryContentWrapper are create content mimeType in "text/html". Then i try to fixed this problem by replace "text/html" with "text/html; charset=utf-8". After that i recompile and restart OFBiz the problem is disappear.

jleroux: uses a new defaultMimeType content property, defaulting to "text/html; charset=utf-8", retrieved by EntityUtilProperties.getPropertyValue()


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716261 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 21:10:24 +00:00
Jacques Le Roux 0bd172fafc Completes r1709882 for <<Possible static XSS issue with Content>> https://issues.apache.org/jira/browse/OFBIZ-6669
As explained in OFBIZ-6669 last comments, contrary to what I did in ContentWorker class, when I before did the work on *ContentWrapper classes I did not use the sanitizer but only an encoder (either HTML or URL).
Because I wrongly supposed that only plain text was used there and certainly my lazy mind thought it was easier because of the URL encoderType to also handle.

When the encoderType is HTML, we now use the sanitizer in *ContentWrapper classes, and ContentWorker.java has also been adapted. 
For that I enhanced the UtilCodec class. The sanitizer is only used when HTML is requested, else the sanitize() method simply calls the encode() method.

I removed the content.sanitize property in content.properties and added a sanitizer.permissive.policy property in the new owasp.properties (in base config) with some explanations. This allows for more configuration.

I changed the line 85 in productsummary.ftl to use an HTML content wrapper, same in minilastviewedcategories.ftl. 
To be totally complete, we should change *lines like* in productsummary.ftl line 85 to use an HTML content wrapper.
Not easy to spot but anyway those not done will simply not totally show well, without any security impacts.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713634 13f79535-47bb-0310-9956-ffa450edef68
2015-11-10 13:40:22 +00:00
Jacques Le Roux 755c644cfc I missed to copy the OFBIZ-6669 Jira issue reference here
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1712971 13f79535-47bb-0310-9956-ffa450edef68
2015-11-06 14:55:25 +00:00
Jacques Le Roux ee6164d8bd Fix for ContentWorker at OFBIZ-6669. For that I have added owasp-java-html-sanitizer-r239.jar and put a "content.sanitize=true" property in content.properties with some explanations. The reason I put this property is because the sanitizer does some (safe) changes which might be unwanted in a context where you are "sure" no one can inject/exploit your DB, see the JIra issue for details. Note that this does not affect the *ContentWrapper.java classes where we use OWASP encoding and not sanitizer. The reason we need the sanitizer here is because we are no only handling content but also HTML code...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1708274 13f79535-47bb-0310-9956-ffa450edef68
2015-10-13 00:40:47 +00:00
Jacopo Cappellato 1830aee2c7 Removed old code for JPublish
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1622010 13f79535-47bb-0310-9956-ffa450edef68
2014-09-02 14:18:17 +00:00
Hans Bakker 2813a3dfde set default baseurl to enable local testing, will still be overridden by a website entry in prod environment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@788598 13f79535-47bb-0310-9956-ffa450edef68
2009-06-26 06:06:58 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Andrew Zeneski ce3904a92e added code to force a system wide default to store uploaded content on the file system instead of DB tables (usually this is a good idea)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@633269 13f79535-47bb-0310-9956-ffa450edef68
2008-03-03 20:43:29 +00:00
Andrew Zeneski 6398079ee5 updated upload path to use the runtime directory
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@633254 13f79535-47bb-0310-9956-ffa450edef68
2008-03-03 20:05:05 +00:00
Jacopo Cappellato 257f417108 Added a new 'runtime' folder, at the same level of 'applications', 'framework' etc..., where all the runtime data such as logs, derby db files and output (such as the pdf report files that can be created with the new service) are created.
Removed the logs and data folders from the framework folder.
Still need to be migrated to the new folder the catalina/work folder: I'm sorry but I don't know how to do this.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@522914 13f79535-47bb-0310-9956-ffa450edef68
2007-03-27 14:02:57 +00:00
Jacopo Cappellato c814ec8713 Misc improvements to the service to send print streams to printers from screen definitions.
Added new service to generate file version of the screens; the files are created in the applications/content/output folder but this is configurable thru the config file in the content component.
An example of its usage is in the 'find orders' screen.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@522021 13f79535-47bb-0310-9956-ffa450edef68
2007-03-24 13:17:36 +00:00
Andrew Zeneski 5f079c05b7 Big content rendering refactor; condensed methods used for rendering content into one, flagged to cache or not. This will make maintaining this much easier. Implemented new streaming event which will send all type of files not just images (deprecating the img event); added mime-type templates to remove the hard coded templates in DataResourceWorker; now supports additional types besides image/*; updated all code using the old methods; however left them in place (deprecated) until we are sure no BSH files use these old methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@513985 13f79535-47bb-0310-9956-ffa450edef68
2007-03-02 22:03:48 +00:00
Jacques Le Roux 64cea174fc This is the change of ASL2 headers in properties files only. Please see comments in another post in dev ML.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@497074 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 16:49:01 +00:00
Andrew Zeneski 15e9ec90c2 moved upload content code to the content component (from party); made more generic and added speedy services for creating uploaded content; also added service for text content (not yet tested)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@492850 13f79535-47bb-0310-9956-ffa450edef68
2007-01-05 02:18:29 +00:00
Jacopo Cappellato 37b7851201 License change from MIT to ASL2.0 for the files of the content component.
Thanks to Scott Gray for the patch (Apache OFBIZ-87).

git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@422864 13f79535-47bb-0310-9956-ffa450edef68
2006-07-17 20:55:18 +00:00
David E. Jones 94fe6d1cda Initial OFBiz import from revision 7923 of the old svn.ofbiz.org SVN repository.
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@418498 13f79535-47bb-0310-9956-ffa450edef68
2006-07-01 19:05:20 +00:00