Introduces a private inner class ListSet representing a Set backed by a List instead of the HashSet implementation.
Thanks Gareth Carter for spotting this and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703954 13f79535-47bb-0310-9956-ffa450edef68
There is an error in isValidEan util. It should be 12 and not 13 in the methods charAt and calcChecksum because they start at 0.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703586 13f79535-47bb-0310-9956-ffa450edef68
This reverts svn:eol-style=native on Java files which were forced by r1044202n, 89 Java files are concerned. This commit hopefully makes things more consistent.
It's indeed hard to see the impact of this change before it's committed. I'll check once done, I already found 116 Java files w/o svn:eol-style=native but there are 1231 Java files at all, so not sure how most are set...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695126 13f79535-47bb-0310-9956-ffa450edef68
streamContentToBrowser fails when the file name contains a comma, happens only with Google Chrome.
Can easily be reproduced for example by uploading the Logo Image URL of the default organization in the party manager, that includes a comma of course.
Fixed in my patch by wrapping the file name in quotes.
Error on the browser console:
GET https://localhost:8443/content/control/stream?contentId=10020 net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
jleroux: at 1935.1 section of http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html I read this example << Content-Disposition: attachment; filename="fname.ext">> So Francis's solution is the right one
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1690086 13f79535-47bb-0310-9956-ffa450edef68
* two-way encryption is now delegated to Apache Shiro, with stronger initialization vectors
* the mechanism is backward compatible
* new tools to update the encryption of private keys, useful to upgrade older versions of OFBiz and most of all to replace old keys with new ones (this is critical to implement stronger security practices as requested by PCI)
* unit tests
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684608 13f79535-47bb-0310-9956-ffa450edef68
Ignoring a thrown ClassCastException is a common pattern in the project (one I have used myself), but it should be avoided in the future because it makes debugging difficult, plus it creates objects unnecessarily.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680058 13f79535-47bb-0310-9956-ffa450edef68
1. Class path loading was ignoring component settings, so class paths for disabled components were being loaded.
2. Configuration files were parsed twice.
3. Potential problem with unloading a loader that failed loading.
I was unable to test Cobertura because the necessary class (org.ofbiz.base.config.CoberturaInstrumenter) isn't being compiled for some reason.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676746 13f79535-47bb-0310-9956-ffa450edef68
This should fix, at least as a temporary solution, the recent issues happening after the upgrade to the new ESAPI.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1659224 13f79535-47bb-0310-9956-ffa450edef68
Thanks Nils for creating the issue and providing the patch for the same. Thanks Divesh for your help in verification.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649393 13f79535-47bb-0310-9956-ffa450edef68
I had to comment out two lines in the unit tests because they were failing after the upgrade; still investigating on this.
This commit resolves OFBIZ-5343.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648747 13f79535-47bb-0310-9956-ffa450edef68
The DefaultEncoder from OWASP ESAPI, used internally by UtilCodec is now built with the default constructor that also adds the JavascriptCodec to the list of codecs used to canonicalize and validate the input.
Renamed the UrlEncoder class to UrlCodec in order to better describe its behavior.
Misc minor cleanups.
Added to the list of tests of the base component a series of Junit test classes that were missing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648403 13f79535-47bb-0310-9956-ffa450edef68
1. Replace DCL code with lazy-initializer class.
2. Remove class name from static method calls.
3. Remove some @Deprecated annotations.
When they were written, the deprecated methods simulated forthcoming Java 6 functionality - with the intent that they would be replaced with Java 6 equivalents, but the Java 6 functionality behaves differently than the deprecated methods. So, replacing the deprecated methods with Java 6 equivalents would cause undesired behavior.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647866 13f79535-47bb-0310-9956-ffa450edef68