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
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
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
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
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
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
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
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
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
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
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
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 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