Adrian Crum
ad32a9ebf9
Added a Scriptlet class to the base component - this will be used to simplify scriptlet implementation.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1330394 13f79535-47bb-0310-9956-ffa450edef68
2012-04-25 16:25:45 +00:00
Adrian Crum
6fdee164ac
FlexibleMapAccessor improvement - fixed inconsistent toString() results.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1330390 13f79535-47bb-0310-9956-ffa450edef68
2012-04-25 16:23:29 +00:00
Adrian Crum
189496613e
Improved ObjectType.isEmpty method - removed unnecessary calls to UtilValidate.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1330386 13f79535-47bb-0310-9956-ffa450edef68
2012-04-25 16:22:16 +00:00
Adrian Crum
5230635e21
ScriptUtil.java bug fix - removed trailing colon from script names.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1329727 13f79535-47bb-0310-9956-ffa450edef68
2012-04-24 13:53:44 +00:00
Jacques Le Roux
922de27729
"Housekeeping of jar files" https://issues.apache.org/jira/browse/OFBIZ-4833
...
Trying to upgrade javamail (mail.jar) from 1.4 (our version) to 1.4.5 from Oracle I discovered that it's now distributed under BCL license (Binary Code License) which is not an open source license hence can't be committed.
So we are stuck with the 1.4 version wich is ok I guess and users should upgrade by themself...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1329565 13f79535-47bb-0310-9956-ffa450edef68
2012-04-24 06:41:52 +00:00
Adrian Crum
e72cd93484
Improved support for optional target type in ObjectType.simpleTypeConvert.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1329219 13f79535-47bb-0310-9956-ffa450edef68
2012-04-23 12:54:27 +00:00
Jacques Le Roux
8e549fdc59
"Housekeeping of jar files" https://issues.apache.org/jira/browse/OFBIZ-4833
...
* Updates httpunit.jar to httpunit-1.7.jar
* Updates wsdl4j-1.5.1.jar to wsdl4j-1.6.2.jar
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328918 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 18:01:20 +00:00
Jacopo Cappellato
ebf04fde84
Synchronized read access to the parsedScript cache to avoid issues with concurrent thread visibility.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328641 13f79535-47bb-0310-9956-ffa450edef68
2012-04-21 12:19:31 +00:00
Jacopo Cappellato
684fce1265
The cache of parsed Groovy scripts was not thread safe; this issue, in instances with several concurrent threads running the same script the first time (i.e. not cached) could cause the same script parsed multiple times and then added to the cache (overriding the previous value); this event was causing the clearing of caches in Freemarker; because of a bug in Freemarker [*] this could cause a deadlock.
...
The issue is present on all versions of Freemarker but it is less frequent on latest version because of the refactoring of caches happened after release 2.3.10.
[*] https://sourceforge.net/tracker/?func=detail&aid=3519805&group_id=794&atid=100794
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328356 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 12:53:35 +00:00
Adam Heath
4e165df74b
FEATURE: Very simple command-line tool to crypt a password.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327742 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:49:28 +00:00
Adam Heath
f092508550
FEATURE: Make use of new HashCrypt cryptPassword functionality.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327741 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:49:22 +00:00
Adam Heath
ffd48b19c9
FEATURE: Add unix(glibc)-compatible password hashing, exact same output, with support for salts.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327740 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:49:10 +00:00
Erwan de Ferrieres
39c7dc647e
Removing commons-compress-1.1.jar as not used anywhere in OFBiz
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327667 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 20:29:19 +00:00
Sascha Rodekamp
e4004ed672
Small code cleanups and refactoring for the Jackrabbit implementation, no functional changes
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327470 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 12:22:20 +00:00
Jacopo Cappellato
160982d9e7
Enhanced GroovyUtil to support the execution of data preparation methods defined in a Groovy script file (similarly to what is already supported by the ScriptUtil class for JSR223).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326996 13f79535-47bb-0310-9956-ffa450edef68
2012-04-17 08:44:43 +00:00
Erwan de Ferrieres
0b7c9aa68b
Upgrading to latest ant version: 1.8.3
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326132 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 15:38:17 +00:00
Erwan de Ferrieres
8b8f386f6a
Upgrade to tomcat 7.0.27
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326090 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 12:07:15 +00:00
Jacques Le Roux
50cbd9b4f3
Complete r1326064, moreover I forgot to save the others *-containers.xml
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326080 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 09:59:33 +00:00
Jacques Le Roux
86ca2bcd04
Complete r1326064, I forgot to save ofbiz-containers.xml before committing and did not notice
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326072 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 08:49:05 +00:00
Jacques Le Roux
8c481181d5
Adapted by hand from Lon F. Binder "CatalinaContainer Doesn't Respect <distributable/> Node for web.xml files." https://issues.apache.org/jira/browse/OFBIZ-4242
...
Per the servlet specification, the web.xml file should allow an optional <distributable/> node to indicate that the application is clusterable. Currently, OFBiz does not respect this setting and assumes all applications should be distributed if any cluster configuration is provided in the ofbiz-containers.xml file. As a result, if, for example, the DeltaManager is enable, all applications attempt to cluster and communicate via DeltaManager.
The expected and proper functionality is to check the individual application's web.xml file for the <distributable/> node and only use the DeltaManager if found; otherwise the StandardManager should be used for sessions.
jleroux: replaced some tabs, reformatted, added a comment about <distributable/> in the *-containers.file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326064 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 07:30:30 +00:00
Jacopo Cappellato
6558763ed6
Based on a suggestion by Adrian Crum, data preparation scripts can now be implemented with script methods that accept a Map context argument, for example:
...
def dataPreparationMethod(Map context) {
...
}
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325750 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 13:10:59 +00:00
Jacopo Cappellato
6450c4f54d
Modified Groovy util methods that prepares the binding to add the ScriptHelper object (to be consistent with the Groovy service engine and event handler and the "Script" JSR223 engine and handler): now Groovy scripts can execute the same exact Grrovy codes that can be executed when they are run thru JSR223.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325620 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 05:53:54 +00:00
Jacopo Cappellato
4835731c9c
Upgrade to the latest version of JUnit (4.10).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311221 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 13:37:18 +00:00
Jacques Le Roux
ec788aa471
Adds 1 to all ports in order to be able to run concurrently an OFBiz instance and a test instance on the same machine.
...
This closes "set different ports for testing in a CI environment (e.g. Jenkins)" https://issues.apache.org/jira/browse/OFBIZ-4794
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311214 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 13:08:37 +00:00
Adrian Crum
e93e73afaa
ScriptUtil bug fix: the SCRIPT_NAMES field was initialized only when debug level was INFO. Removed enclosing debug level check so SCRIPT_NAMES will always be initialized.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311011 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 14:21:01 +00:00
Jacques Le Roux
bf5a242cf0
Creates an ant task which uses YUICompressor (yuicompressor-2.4.6.jar) to dynamically minify our own (or custom for users) js and css files (most of the biggest external ones are already compressed)
...
More work is needed, this is just the the minimum with an example.
Related to https://issues.apache.org/jira/browse/OFBIZ-4792
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310983 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 12:12:07 +00:00
Jacques Le Roux
838c5c52c4
No functional change, just shift a line in proper place
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310978 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 11:25:35 +00:00
Jacques Le Roux
8b2bfe325f
Groups Tomcat http/s connectors compression properties and adds text/javascript,text/css as new compressableMimeTypes
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310975 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 10:51:02 +00:00
Adrian Crum
3348ba5734
Bug fix in ScriptUtil.java - create a local copy of the calling context so script local variables are not copied to it.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310307 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 12:51:14 +00:00
Adrian Crum
533bd091b7
CVE-2012-1622: Disable support for nested scripts in FlexibleStringExpander.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309879 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 14:20:56 +00:00
Adrian Crum
99504db991
Added some static methods to FlexibleStringExpander that enable querying an expression about its component parts.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309360 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:49:12 +00:00
Adrian Crum
e94ccd9369
Added a SCRIPT_NAMES field to ScriptUtil.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:47:30 +00:00
Erwan de Ferrieres
e42a5f1c85
Reverting 1308301 as the commit could seems as a hack: ./ant can't find the class issue created for this: OFBIZ-4783
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309337 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 11:38:40 +00:00
Sascha Rodekamp
ceb27828a7
Changed the FileReader to a BufferedReader during script loading. The file reader throws an exception when the file path contains spaces (which are encoded). The result was that scripts aren't loaded and pages only showed an error message. Working with an InputStream solves this issue.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308896 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 13:36:03 +00:00
Jacopo Cappellato
7e8d52d3bf
Fixed path to svninfo.ftl file that was not working after the switch to freemarker 2.3.19
...
Thanks to Scott for the solution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308817 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 11:09:54 +00:00
Jacopo Cappellato
ec02e2ac4f
this is a workaround to fix errors when loading included templates with a relative path after the migration to Freemarker 2.3.19; I am still investigating the root cause.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308734 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 07:46:12 +00:00
Jacopo Cappellato
66e063b126
Removed the last webslinger jar that I missed in my previous commits.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:09:22 +00:00
Jacopo Cappellato
6567fca33d
Upgrade to latest stable release of Freemarker: 2.3.19
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308358 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:08:17 +00:00
Jacopo Cappellato
7bc6142674
Set log levels for Freemarker (to disable all log messages under warning) to resolve performance issue in newer releases of freemarker.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308355 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 13:58:14 +00:00
Erwan de Ferrieres
c5c75df222
Seems using ./ant for running install and tests is not detecting the class for cobertura. Testing if the jar is present is making it right. Resolves OFBIZ-4757
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308301 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 11:16:10 +00:00
Adrian Crum
e1a03aee17
Small code cleanup in ObjectType.simpleTypeConvert, added support for null target type (returns original object). Updated unit tests.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307551 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 17:48:32 +00:00
Jacopo Cappellato
8c99e6b35e
Upgrade to Groovy 1.8.6 (from Groovy 1.7.7).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306769 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 09:43:54 +00:00
Erwan de Ferrieres
029f6e9410
Removing usage some more iterators
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306568 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 20:18:13 +00:00
Joseph Eckard
b4b7b1b0a5
fixed typos in example jetty config, NIO connectors did not have the correct types
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305605 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 21:18:34 +00:00
Jacques Le Roux
8f6004c2eb
This was missing in r1305004
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305316 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 11:42:49 +00:00
Jacques Le Roux
7d943cb341
A patch from Anne Jessel "Support validation of resource xml files" https://issues.apache.org/jira/browse/OFBIZ-4723
...
The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard.
The attached patch:
provides a valid xsd
updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list
includes simple unit tests for UtilProperties to ensure it does work with both formats
changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file.
Some minor code cleanups to these files.
jleroux: the base test suite was successfully run locally once UtilIOTests have been commented out (still an issue with it on Windows)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305004 13f79535-47bb-0310-9956-ffa450edef68
2012-03-25 11:07:57 +00:00
Jacques Le Roux
0c07b6df6f
Revert r1304193 for now
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304737 13f79535-47bb-0310-9956-ffa450edef68
2012-03-24 09:35:09 +00:00
Jacques Le Roux
1c5a0459c3
A patch from Anne Jessel "Support validation of resource xml files" https://issues.apache.org/jira/browse/OFBIZ-4723
...
The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard.
The attached patch:
provides a valid xsd
updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list
includes simple unit tests for UtilProperties to ensure it does work with both formats
changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file.
Some minor code cleanups to these files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304193 13f79535-47bb-0310-9956-ffa450edef68
2012-03-23 05:47:10 +00:00
Joseph Eckard
ba4d9e2eee
update jetty container to use the latest jetty-8 release, 8.1.2
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303894 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 17:08:31 +00:00
Jacopo Cappellato
dc4edc748e
CVE-2012-1621: Removed the Webslinger component and all the framework dependencies on it; the reasons for this
...
* no active committer was maintaining the webslinger component
* the component was experimental and not really used by OFBiz
* the component was really big (lot of jars etc...) and we are trying to slim down the OFBiz framework and keep only the essential/useful features
* this fixes a security issue reported to the OFBiz PMC
The only Webslinger feature used by the OFBiz framework was the "service debug mode" (enabled by default with the property servicedispatcher.servicedebugmode): I have considered to keep it but it was impossible because it relied on Webslinger legacy code (in the org.webslinger.invoker.* package) that was never contributed as a source file to the OFBiz project; I have tried to review the source file from an external Webslinger repo but I couldn't find them; the only site about Webslinger I could find is this:
http://www.webslinger.org/Downloads
but the svn resources mentioned there are broken. The fact that the OFBiz frameework was dependent (for a feature useful only in development mode) on an external project that doesn't publish its source code (at least in an easy to find location) convinced me that it was better to clean up the dependency completely; on the bright side OFBiz should now use less memory.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1301866 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 05:35:45 +00:00