Commit Graph
35 Commits
Author SHA1 Message Date
Jacques Le Roux cda0fa5c3d No functional changes. While reviewing Wai's patch for OFBIZ-7112 I noticed that he (re)used this pattern introduced earlier:
(resource == null || resource.length() <= 0)
From Java spec. a String, Collection, Map or CharSequence can't have a negative length, so the pattern above can be reduced to 
  (resource == null || resource.length() == 0)
which can be replaced using 
  UtilValidate.isEmpty()
I checked, there are several other occurrences of this pattern (some very old, I guess most were routinely copied from an initial occurrence). I decided to replace all of them, here they are.

I did that already long ago for the 
  (resource == null || resource.length() == 0)
pattern. It remains 4 of them. Three are justified (because of the dependency on base component or because using isEmpty() on Object is disputable for performance reasons). I took care of the remaining one right aways (in SplashScreen.java)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1747976 13f79535-47bb-0310-9956-ffa450edef68
2016-06-12 10:43:58 +00:00
Pranay Pandey 64c8c16c0e OFBIZ-7044 - Removed redundant entries of handlers from controllers where common-controller is already included. Thanks Amardeep Singh Jhajj for reporting this improvement and providing patch for the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1742714 13f79535-47bb-0310-9956-ffa450edef68
2016-05-07 14:09:23 +00:00
Shi Jinghai cecccc0534 OFBIZ-7026 Remove duplicated jars under solr component
Upgrade hadoop jars from 2.6.0 to 2.7.2 to avoid https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-1776.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1741942 13f79535-47bb-0310-9956-ffa450edef68
2016-05-02 09:18:27 +00:00
Shi Jinghai 88e1eeb8c4 OFBIZ-7026 Remove duplicated jars under solr component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1741386 13f79535-47bb-0310-9956-ffa450edef68
2016-04-28 05:36:14 +00:00
Jacques Le Roux 59dea3abf4 A 1st patch from Pierre Smits for <<Have the ability to test solr queries through widgets (screens & forms)>> https://issues.apache.org/jira/browse/OFBIZ-6595
Adding widgest (screens, forms, etc) so that an end-user can execute a search  against the data indexed would enhance the applicability of the application.
This patch is the first increment to address the issue. Please feel free to test drive and provide feedback
Currently it includes the following aspects:

    SolrMenus.xml - providing the application menu, items:
        main - opening the start screen of the app
        admin - opening the Solr admin page in a new target
        newquery - opening the query screen
    SolrScreens.xml - defining Solr specific screen widgets
    CommonScreens.xml - defining the common screens for Solr specific screen widgets
    SolrUiLabels.xml - defining Solr app specific labels
    SolrForms.xml - defining Solr specific form widgets
    controller.xml - (re)defining request-map and view-map re widgets

This file also includes a modification to web.xml of the Solr component, changing the mainDecoratorLocation
This patch currently doesn't include functionality to execute a query through widgets and show the result.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1736878 13f79535-47bb-0310-9956-ffa450edef68
2016-03-28 12:15:15 +00:00
Shi Jinghai 4882df4738 OFBIZ-6755 Update the passport component to use httpclient/core-4.4.1 instead of commons-httpclient-3.1
1. Remove commons-httpclient-3.1.jar from passport component.
2. Use httpclient 4.4.1 in base/lib instead.
3. Remove randomString methods, use RandomStringUtils.randomAlphanumeric instead.
4. Move getAllowAllHttpClient to UtilHttp.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1735021 13f79535-47bb-0310-9956-ffa450edef68
2016-03-15 06:06:33 +00:00
Jacques Le Roux 96d15f033e Reverts r1730873 which itself reverted r1730320 because tests did not pass. But just 4 minutes before my commit (at least I received it 4 mins before) Jinghai fixed the issue at r1730790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1730921 13f79535-47bb-0310-9956-ffa450edef68
2016-02-17 19:30:54 +00:00
Jacques Le Roux fbf3349d3b Reverts r1730320 because tests don't pass and I need to have the tests clean to move ahead.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1730873 13f79535-47bb-0310-9956-ffa450edef68
2016-02-17 16:57:08 +00:00
Shi Jinghai 4b6fd34e46 OFBIZ-6715 Solr rebuild problem.
Changes are:
1. Comment out solr eecas.xml as it's duplicated to ecas in eecas_product.xml.
2. Add default-value="solrdefault" to indexName of addToSolr service.
3. Replace some tabs with spaces.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1730790 13f79535-47bb-0310-9956-ffa450edef68
2016-02-17 07:32:08 +00:00
Shi Jinghai 43d25fe7e7 Refs OFBIZ-6715 Solr rebuild problem
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1730320 13f79535-47bb-0310-9956-ffa450edef68
2016-02-14 11:59:59 +00:00
Jacques Le Roux 195acfce5a A patch from Pierre Smits for "Add wiki documentation regarding the solr component" https://issues.apache.org/jira/browse/OFBIZ-6592
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1727001 13f79535-47bb-0310-9956-ffa450edef68
2016-01-27 11:29:18 +00:00
Jacques Le Roux 0a982250e6 Temporary fix for "UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [web-app_3_0.xsd]" - https://issues.apache.org/jira/browse/OFBIZ-6807
As suggested by Deepak keeps only <<web-app version="3.0">> in web.xml files instead of whole xmlns and schemaLocation. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1726388 13f79535-47bb-0310-9956-ffa450edef68
2016-01-23 11:52:08 +00:00
Deepak Dixit 9aad52f584 OFBIZ-(6655) Add session tracking mode and make cookie secure for scrum and solr component. Also fix the Invalid content was found starting with element 'description' for manufacturing component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1724957 13f79535-47bb-0310-9956-ffa450edef68
2016-01-16 11:15:19 +00:00
Ashish Vijaywargiya abbae0ecb6 Applied patch from OFBIZ-6777 - Product weight field enhancements
================================
There are three sets of dimensions in the Product entity.
(productHeight, shippingHeight), (productWidth, shippingWidth), (productDepth, shippingDepth) but in case of weight, there is another set of dimension field weight and productWeight which are inconsistent in nature.
Fix this thing and correct all instances of this in the framework.
=================================
Thanks Suraj for reporting the issue and providing the patch for the same. Thanks Jacopo and Pierre for discussing the issue with Suraj.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1720900 13f79535-47bb-0310-9956-ffa450edef68
2015-12-19 11:32:08 +00:00
Jacques Le Roux 13dc98cadc Removes useless and vulnerable hadoop-hdfs-2.2.0.jar - OFBIZ-6756
The hadoop-hdfs-2.2.0.jar lib has been introduced with the solr component but the hadoop-hdfs-2.6.0.jar is also there and if hadoop-hdfs-2.2.0.jar is removed OFBiz compiles w/o issues. Without hadoop-hdfs-2.2.0.jar the tests pass.

Note: https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3627

I also changed wrong entries in specialpurpose/LICENCE from 2.2.0 to 2.6.0

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1718127 13f79535-47bb-0310-9956-ffa450edef68
2015-12-05 22:04:39 +00:00
Jacques Le Roux 5649e758dc 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/specialpurpose@1714652 13f79535-47bb-0310-9956-ffa450edef68
2015-11-16 19:02:25 +00:00
Jacques Le Roux a297d5d8c7 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/specialpurpose@1713991 13f79535-47bb-0310-9956-ffa450edef68
2015-11-12 09:34:56 +00:00
Taher A. Alkhateeb 7030086874 another round of javolution removal in achieving OFBIZ-5169
Remove javolution reference from multiple java source files and a few
BIRT reports. I had to replace the FastList with a LinkedList in 
SolrProductSearch.getSideDeepCategories(..) because it uses the 
implementation methods getLast() and removeFirst()

REF https://issues.apache.org/jira/browse/OFBIZ-5169


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1710122 13f79535-47bb-0310-9956-ffa450edef68
2015-10-23 05:52:25 +00:00
Jacques Le Roux eb3516bedb 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/specialpurpose@1708560 13f79535-47bb-0310-9956-ffa450edef68
2015-10-14 08:51:36 +00:00
Shi Jinghai fa16b1e420 OFBIZ-6610 Upgrade Solr and Lucene librairies to version 5
1. Remove the specialpurpose/solr/home/solrdefault/runtime.
2. Remove src attribute in solr jars in .classpath.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1707047 13f79535-47bb-0310-9956-ffa450edef68
2015-10-06 13:03:14 +00:00
Shi Jinghai 1405615b1a 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/specialpurpose@1707042 13f79535-47bb-0310-9956-ffa450edef68
2015-10-06 12:48:53 +00:00
Arun Patidar 7d1bf43b79 [OFBIZ-6171] Replacing 'Open for Business' references with 'Apache OFBiz'from remaining occurences.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1706593 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 14:31:12 +00:00
Jacques Le Roux 596359c680 I found a possible XSS attack through ProductContentWrapper.java.getProductContentAsText() which is notably used in several FTL files. This exists also in others *ContentWrapper.java.
Note that in supported releases it's hard to exploit, it's a Stored XSS https://www.owasp.org/index.php/Types_of_Cross-Site_Scripting which means you need 1st to somehow inject exploiting code in the DB.

This fixes it by changing the ContentWrapper interface
from
    public interface ContentWrapper {
        public StringUtil.StringWrapper get(String contentTypeId);
    }
to
    public interface ContentWrapper {
        public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
    }

And changing the Category, Party, Product, ProductPromo and WorkEffort ContentWrapperS accordingly. This means to use 2 types of encoderTypes: "html" and "url".
The "html"  encoderType will be used for all ProductContentTypes but those who contain URL in their ContentTypeIdS (actually end with, "_URL") which will use "url" encoderType.
It concerns not only the get() method but also methods like getPartyContentAsText(), getProductContentAsText(), etc.

It seems a big change but it's straightforward. It's normally complete. 

There are some (unrelated) tabs replaced by spaces here and there, and few trailing spaces removed but nothing big

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1705329 13f79535-47bb-0310-9956-ffa450edef68
2015-09-25 16:27:12 +00:00
Jacques Le Roux 8bfa151997 No functional changes for https://issues.apache.org/jira/browse/OFBIZ-6651
Removes unused methods (not in Java code, FTL templates and Groovy scripts) in GenericValue and EntityUtil classes + misc related comments or logs
Adds log warning to spot possible use cases in templates and scripts of getRelated() and getRelatedOne() methods

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1704769 13f79535-47bb-0310-9956-ffa450edef68
2015-09-23 08:03:45 +00:00
Jacques Le Roux 1d84f5103a A completed patch from Oleg Andreyev for "Using official content type for json requests" https://issues.apache.org/jira/browse/OFBIZ-6608
I suggest using application/json instead of application/x-json as it is official content type. It seems x-json does not cause any problem for the time being but browsers will load json responses correctly without asking for download. It's handy in development time. It also matches JQuery Accept header.

jleroux: I also used it in Solr




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1701915 13f79535-47bb-0310-9956-ffa450edef68
2015-09-09 07:16:18 +00:00
Jacques Le Roux 5cd3a7c560 No functional changes, fixes typos
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1701498 13f79535-47bb-0310-9956-ffa450edef68
2015-09-06 16:17:11 +00:00
Shi Jinghai ce8b78b3b7 OFBIZ-5042 Apache Solr Implementation.
Add permission check on /update, /update/json, /update/csv and /update/extract requests. These requests are defined in an index's solrconfig.xml.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1701495 13f79535-47bb-0310-9956-ffa450edef68
2015-09-06 15:46:45 +00:00
Shi Jinghai 0cff713fd8 OFBIZ-6596 The Solr redirection does not work in trunk demo.
Removed https scheme check and demo-trunk-ofbiz.apache.org/solr/ can be displayed correctly now.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1701379 13f79535-47bb-0310-9956-ffa450edef68
2015-09-05 12:29:04 +00:00
Shi Jinghai 0889e9138d OFBIZ-6596 The Solr redirection does not work in trunk demo.
Commented out https scheme check. Let see whether it would work.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700960 13f79535-47bb-0310-9956-ffa450edef68
2015-09-03 09:07:24 +00:00
Shi Jinghai 65316f0723 OFBIZ-6596 The Solr redirection does not work in trunk demo.
1. Use response.sendRedirect to forward url to login page instead of the response.setHeader("location", url), this avoids the warning messages from EntityUtilProperties. Besides, when testing in similar config as demo-ofbiz-trunk is (port 80 -> 8080, port 443 -> 8443), this change can keep the url to 80 or 443.

2. Replace tabs to spaces in several java files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700739 13f79535-47bb-0310-9956-ffa450edef68
2015-09-02 09:09:45 +00:00
Shi Jinghai e5caafad06 OFBIZ-5042 Apache Solr Implementation.
Add apache solr to secondary top menu and /solr/control/main request to accept the link from the menu.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700599 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 15:37:20 +00:00
Jacques Le Roux 482ba64019 A patch from Pierre Smits for "Have hard coded links in admin screen open in new windows" https://issues.apache.org/jira/browse/OFBIZ-6593
Currently the various hard coded links at the bottom of the admin screen open in the same window. These should open in a new window to provide a better UX.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700555 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 14:05:04 +00:00
Shi Jinghai a11bc344c1 OFBIZ-6591 ofbiz does not compile
Replaces tabs with spaces.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700448 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 09:38:15 +00:00
Shi Jinghai 1ab2da9084 OFBIZ-6591 ofbiz does not compile
The reason behind is lack of jars in applications/content/build/lib and specialpurpose/lucene/lib.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700446 13f79535-47bb-0310-9956-ffa450edef68
2015-09-01 09:34:22 +00:00
Shi Jinghai c8967922ce OFBIZ-5042 Apache Solr Implementation.
1. Put the patch into trunk.
2. Added access control to solr /admin/ pages.
3. Upgraded solr to 4.9.0 to match Lucene version in trunk.
4. Removed solr.solr.home, used 
SolrResourceLoader loader = new SolrResourceLoader("specialpurpose/solr/conf");
instead.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1700119 13f79535-47bb-0310-9956-ffa450edef68
2015-08-30 13:27:07 +00:00