Commit Graph
2421 Commits
Author SHA1 Message Date
Jacques Le Roux 3b84a03fab Updates commons collections from 3.2.2 to 4.1 - OFBIZ-6748
Even if we are covered from the Java Object possible deserialisation exploit by the 3.2.2 version, since it's easy to update, this issue to update the trunk to the last available release.

I updated the .classpath file by hand, but kept the tabs in it, so I could move misplaced entries to their right alphabetical places.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1717247 13f79535-47bb-0310-9956-ffa450edef68
2015-11-30 13:01:47 +00:00
Jacques Le Roux 7524cd299c Fixed a bug introduced w/ r1714652 (not sure on this one but better safe than sorry)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714691 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 22:00:52 +00:00
Jacques Le Roux d16b6da338 Fixed a bug introduced w/ r1714652
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714689 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 21:56:56 +00:00
Jacques Le Roux 1b8b15b45d Fixed a bug introduced w/ r1714652
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714688 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 21:54:10 +00:00
Jacques Le Roux fbca214fca Fixed a bug introduced w/ r1714652
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714686 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 21:52:16 +00:00
Jacques Le Roux b32ea9f89f No functional change, completes r1713985: removes superfluous .properties extension from UtilProperties requests (and yes I checked UspsServicesTests ;))
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714652 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 19:02:25 +00:00
Jacques Le Roux c66a9b8c30 Updates commons-collections lib from 3.2.1 to 3.2.2
[CVE-2016-2170] The infamous Java serialization vulnerability

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714571 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 12:24:13 +00:00
Jacques Le Roux 8ae051720e Non functional changes
Removes useless commented out code in UtilCodec.java
Replaces a tab by spaces in ContextFilter.java
Removes useless line and replaces tabs by spaces in OFBizSolrContextFilter.java (annoying in compare)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713991 13f79535-47bb-0310-9956-ffa450edef68
2015-11-12 09:34:56 +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 2e46227f59 This has slipped in inadvertently, removes to add in next commit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713632 13f79535-47bb-0310-9956-ffa450edef68
2015-11-10 13:26:23 +00:00
Jacques Le Roux 5befa22833 A modified patch from Pierre Smits for "Display GeoPoint with map in WebTools" https://issues.apache.org/jira/browse/OFBIZ-6527
Currently only a list of geoPoints is shown. The user experience will improve when we not only show that, but a map as well.

jleroux: 
I refactored the js scripts in party editGeoLocation.ftl and added webtools GeoLocation.ftl into a new common GoogleGeoLocation.ftl template now included in both party editGeoLocation.ftl and webtools GeoLocation.ftl 
I also removed trailing blanks in common GeoLocation.ftl template. 
I also added a French label

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713627 13f79535-47bb-0310-9956-ffa450edef68
2015-11-10 12:32:01 +00:00
Jacques Le Roux 81dc18d40c A rearranged patch from Gareth Carter for "Update SimpleContentViewHandler to return mime type on file extension and use inline for content-disposition" https://issues.apache.org/jira/browse/OFBIZ-6702
SimpleContentViewHandler will return mime type 'text/html' for all DataResource values without a specified mimeTypeId. Changing to DataResourceWorker.getMimeType will allow determining the mimeTypeId by file extension 
Fixing the mime type will allow the browsers to display content inline if UtilHttp is updated aswell. All unknown extensions will be set to octet-stream causing the browser to prompt for download

jleroux: after some discussions, this finally uses a content-disposition-type property in requestHandler.properties to allow more flexibility for users (see UtilHttp.setContentDisposition() method). Beware "inline" is less secure. For this reason, Gareth forced the "dangerous" text/html mime type to application/octet-stream in SimpleContentViewHandler class. This to prevent possible static XSS attacks. See the Jira issue for more details.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1712835 13f79535-47bb-0310-9956-ffa450edef68
2015-11-05 17:47:00 +00:00
Jacques Le Roux aa9129deb3 These changes accidentally slipped in with r1712347, reverting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1712366 13f79535-47bb-0310-9956-ffa450edef68
2015-11-03 18:41:04 +00:00
Jacques Le Roux 40bc757dea An updated and modified patch from Bob Morley for "ProductStore did not allow the default timezone to be set" https://issues.apache.org/jira/browse/OFBIZ-2813
The ProductStore has the defaultLocaleString and the defaultCurrencyUomId but does not have a defaultTimeZoneString.  What happens when a store is selected (from e-commerce or the POS) is that it will look to the user for a lastTimeZone and if that is not set, it would simply revert to the TimeZone.getDefault() (so the timezone based on the server).

The trouble we had was that you may have an application server that is running in a completely different timezone than what is desired for the store.

jleroux: see comments in the Jira issue for the modifications I did

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1712347 13f79535-47bb-0310-9956-ffa450edef68
2015-11-03 16:53:30 +00:00
Adrian Crum 8a85268f91 Grid widget cache settings are missing - https://issues.apache.org/jira/browse/OFBIZ-6405.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709111 13f79535-47bb-0310-9956-ffa450edef68
2015-10-16 20:55:20 +00:00
Jacques Le Roux 83b092356e Move guava lib from solr/lib/runtime to base/lib to avoid dependency on solr component, thanks to Vyom for the reminder
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1708560 13f79535-47bb-0310-9956-ffa450edef68
2015-10-14 08:51:36 +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
Shi Jinghai d52db9b7bb OFBIZ-6610 Upgrade Solr and Lucene librairies to version 5
1. Upgrade the solr/lucene component to the latest 5.3.1.
2. Angular related js and html files are removed.
3. The jquery-1.7.2.min.js is removed as it's not used in solr.
4. Change specialpurpose/solr/conf to specialpurpose/solr/home.
5. Move specialpurpose/solr/solrdefault to specialpurpose/solr/home/solrdefault.
6. The files under specialpurpose/solr/home/solrdefault are all from solr-5.3.1 package/server/solr/configsets/sample_techproducts_configs/, the solrconfig.xml is configured: <dataDir>${solr.data.dir:runtime/indexes}</dataDir>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1707042 13f79535-47bb-0310-9956-ffa450edef68
2015-10-06 12:48:53 +00:00
Michael Brohl 82b7386e3d Applied patch for OFBIZ-6621: MapContext.entrySet() slows down when ByteBuffer objects are in the context.
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
2015-09-19 08:43:40 +00:00
Jacques Le Roux f98543b1ff A patch from Gaudin Pierre for "error in isValidEan util" https://issues.apache.org/jira/browse/OFBIZ-6624
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
2015-09-17 12:05:19 +00:00
Adrian Crum 6066e4e42f Make primitive initialization explicit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1700864 13f79535-47bb-0310-9956-ffa450edef68
2015-09-02 18:43:41 +00:00
Adrian Crum 26198405b9 Added a FIXME comment. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1698406 13f79535-47bb-0310-9956-ffa450edef68
2015-08-28 20:26:01 +00:00
Shi Jinghai 85ab0e0eff OFBIZ-4154 Use ZXing to generate QR 2d barcode.
1. Add zxing-core-3.2.0.jar to framework/base/lib and .classpath.
2. Add services_qrcode.xml and QRCodeService.java in framework/common/.
3. Add qrcode request in common-controller.xml and QRCodeEvents.java under framework/common/.
4. Add qrcode.properties and QRCodeUiLabels.xml under framework/common/.
5. Add a barcode example page in specialpurpose/example, entry is on page: /example/control/EditExample?exampleId=EX01, the example can be seen on page: /example/control/ExampleReportPdfBarcode?exampleId=EX01

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696921 13f79535-47bb-0310-9956-ffa450edef68
2015-08-21 10:03:11 +00:00
Jacques Le Roux 067df90ae1 After r1695126, I found that most of the Java files have svn:eol-style=native. So only 116 Java files were missing svn:eol-style=native. I guess those have been added by committers who are not using the OFBiz svn config file on their machines. So rather than removing svn:eol-style=native, this commits add the property to the files which miss it. Here 116+89=205 files have their svn:eol-style property changed to native.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695129 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 16:33:23 +00:00
Jacques Le Roux dca48b0893 Reverts r1044202. No functional change.
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
2015-08-10 16:15:37 +00:00
Deepak Dixit cc7d7333c1 (OFBIZ-6562) Used getCombinedMap instead of getParameterMap while preparing param map for string-map-prefix. Now string-map-prefix will work fine in case of ajax call as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693393 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 08:07:20 +00:00
Shi Jinghai a575165ce4 OFBIZ-6504 - Create password protected PDF in OFBiz
1. Changed to use FOP 2.0 native encryption, jars are updated.

2. Now the Embeded options are request parameters supported in ScreenFopViewHandler.java, the options are:
http://xmlgraphics.apache.org/fop/2.0/pdfencryption.html#embedded
the default values of the options can be configured in framework/webapp/config/fop.properties.

3. The demo page is https://localhost:8443/example/control/ExampleReportPdfOptions?exampleId=EX01

4. Barcode is tested.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1691852 13f79535-47bb-0310-9956-ffa450edef68
2015-07-19 20:41:32 +00:00
Jacques Le Roux 1d9f55c71f A patch from Francis Douet for "streamContentToBrowser fails when the file name contains a comma, only with Chrome." https://issues.apache.org/jira/browse/OFBIZ-6554
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
2015-07-09 12:30:22 +00:00
Jacopo Cappellato eb6d01b066 New implementation of the two-way cryptographic services of OFBiz based on Apache Shiro:
* 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
2015-06-10 09:01:30 +00:00
Adrian Crum a73c51bb49 Fix a thread-safety issue. Trivial unit test changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684216 13f79535-47bb-0310-9956-ffa450edef68
2015-06-08 16:12:30 +00:00
Jacques Le Roux af9ccf0c17 A patch from Taher Alkhateeb "Upgrade OFBiz to Java JDK 8" https://issues.apache.org/jira/browse/OFBIZ-6458
1st step: fixes a test which was not passing 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684042 13f79535-47bb-0310-9956-ffa450edef68
2015-06-07 16:03:04 +00:00
Taher A. Alkhateeb 62b0f73212 Translate the framework to Arabic
Another part of the translation of OFBiz to Arabic 
project found in JIRA OFBIZ-6432.

The commit translates the following files :
- framework/base/config/DateTimeLabels.xml
- framework/widget/config/conditional.xml

refs https://issues.apache.org/jira/browse/OFBIZ-6432


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1682699 13f79535-47bb-0310-9956-ffa450edef68
2015-05-31 08:49:43 +00:00
Jacopo Cappellato 74e6dec22f OFBIZ-6380 Upgraded Log4j from 2.2 to 2.3.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680733 13f79535-47bb-0310-9956-ffa450edef68
2015-05-21 05:40:27 +00:00
Adrian Crum 240ba74d82 Replace ClassCastException with type check - https://issues.apache.org/jira/browse/OFBIZ-6291.
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
2015-05-18 17:18:54 +00:00
Jacques Le Roux 688da5d2d2 "Updates Log4j 2.2 to 2.3" https://issues.apache.org/jira/browse/OFBIZ-6380
Reverts r1679702

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679723 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 10:52:41 +00:00
Deepak Dixit 6ce8d7d74d OFBIZ-6351 - Upload function does not work on Party Manager.
Upgrade commons-compress jar from 1.4.1 to 1.9

Thanks Supachai Chaima-ngua and Pierre Smits for reporting the issue, and thanks Supachai Chaima-ngua for providing the fix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679709 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 09:01:01 +00:00
Jacques Le Roux 4bf39d2316 "Updates Log4j 2.2 to 2.3" https://issues.apache.org/jira/browse/OFBIZ-6380
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1679702 13f79535-47bb-0310-9956-ffa450edef68
2015-05-16 08:27:54 +00:00
Jacopo Cappellato 5c2e9841e8 Removed commons-cli jar that was not used: barcode4j has an optional dependency on it but only if used from the command line (which is not the case in OFBiz); Groovy has a dependency on Commons CLI, antlr, asm but it uses a copy of them bundled in groovy-all jar, so removing the pathelements set for the ant path id "groovy.class.path".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1677597 13f79535-47bb-0310-9956-ffa450edef68
2015-05-04 13:36:09 +00:00
Adrian Crum a84272b1ba Trivial code cleanup in ObjectType.java - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1677386 13f79535-47bb-0310-9956-ffa450edef68
2015-05-03 11:25:08 +00:00
Adrian Crum ebf03ea721 Some work on ComponentContainer.java:
1. Improved thread safety
2. Optimization
3. Code cleanup
4. Use String constant instead of hard-coded value


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676985 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 13:46:46 +00:00
Adrian Crum d82005c958 Use String constant instead of hard-coded value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676975 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 12:42:17 +00:00
Adrian Crum ec9d5d5416 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676974 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 12:41:26 +00:00
Adrian Crum ef710ed02f Some work on ComponentLoaderConfig.java:
1. Thread safety
2. Optimization
3. Code cleanup
4. Improved error handling

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676970 13f79535-47bb-0310-9956-ffa450edef68
2015-04-30 12:12:17 +00:00
Adrian Crum c2de699ca6 Fixed some bugs in startup code (https://issues.apache.org/jira/browse/OFBIZ-6268):
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
2015-04-29 13:52:27 +00:00
Adrian Crum cd4f6cdbb3 Fixed a bug in UtilMisc.java where the List returned by the availableLocales() method included an empty Locale - causing errors in FreeMarker templates.
https://issues.apache.org/jira/browse/OFBIZ-6309

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676674 13f79535-47bb-0310-9956-ffa450edef68
2015-04-29 06:10:01 +00:00
Adam Heath 2dd530a51e Remove uesless exclusion of ofbiz crypto class compilation.
This was based on the availabily of javax.crypto.Cipher, which became
standard in java 1.4.  We require 1.7.  This is very old.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676154 13f79535-47bb-0310-9956-ffa450edef68
2015-04-26 23:30:20 +00:00
Nicolas Malin 5f6c13b369 correct String conversion to Set on StringUtil that not respect the field order, thanks to Francis Douet to raise it on the issue (OFBIZ-6299 Field order is not correct in the auto-complete for look-ups.)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1675998 13f79535-47bb-0310-9956-ffa450edef68
2015-04-25 07:00:42 +00:00
Adrian Crum a2fc70daff A small change to the behavior of the UtilProperties.createProperties() method: if the file is not found, return null instead of throwing an exception.
https://issues.apache.org/jira/browse/OFBIZ-6261

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674453 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 08:30:03 +00:00
Adrian Crum a1bb4ff6bc Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674064 13f79535-47bb-0310-9956-ffa450edef68
2015-04-16 13:05:55 +00:00
Adrian Crum f315f0d5be Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00