Commit Graph
1143 Commits
Author SHA1 Message Date
Arun Patidar 22321501c4 Applied patch from jira issue - OFBIZ-7453 - Enforce noninstantiability to WebDavUtil Class. Thanks Rishi Solanki and Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750532 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 15:01:10 +00:00
Arun Patidar 48a8eefce6 Applied patch from jira issue - OFBIZ-7446 - Enforce noninstantiability to WebSiteWorker Class. Thanks Rishi Solanki and Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750527 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 14:44:16 +00:00
Arun Patidar a91b9edae9 Applied patch from ticket - OFBIZ-7339 - Replace EntityUtilProperties getPropertyValue method with correct method calls. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749882 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 13:10:51 +00:00
Jacques Le Roux 89212904bd Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:37:47 +00:00
Jacques Le Roux 4931db1ed9 Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061 by replacing xsd files references in xml files by -ns.xsd files and removing the concerned xsd files
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:14:16 +00:00
Jacques Le Roux 27b736e3ed 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@1747976 13f79535-47bb-0310-9956-ffa450edef68
2016-06-12 10:43:58 +00:00
Jacques Le Roux 3aadf4e8da A slightly modified patch from James Yong for "Autocompletion for Compound Widget" https://issues.apache.org/jira/browse/OFBIZ-7061
1. The following xsd are duplicated to use namespaces
  site-conf.xsd     ->  site-conf-ns.xsd
  widget-form.xsd   ->  widget-form-ns.xsd
  widget-screen.xsd ->  widget-screen-ns.xsd
  widget-menu.xsd   ->  widget-menu-ns.xsd
  simple-methods.xsd->  simple-methods-ns.xsd
For example, in site-conf-ns.xsd, we have the following document level attribute
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://ofbiz.apache.org/Site-Conf" targetNamespace="http://ofbiz.apache.org/Site-Conf">
instead of 
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

2. The above schema are used into compound-widgets.xsd so that compound widgets use only one consolidated schema. 

3. Update ExampleCompoundWidgets.xml to use the new compound-widgets.xsd. For example
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:sc="http://ofbiz.apache.org/Site-Conf"
        xmlns:sm="http://ofbiz.apache.org/Simple-Method"
        xmlns:wf="http://ofbiz.apache.org/Widget-Form"
        xmlns:wt="http://ofbiz.apache.org/Widget-Tree"
        xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
        xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
        xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
    
    <sc:site-conf>
        <sc:request-map uri="CompoundWidgets1">
            <sc:security https="true" auth="true"/>
            <sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
            <sc:response name="success" type="view" value="CompoundWidgets1"/>
        </sc:request-map>
        <sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>

        <sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
        <sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
    </sc:site-conf>
...... the rest

4. Change java code to support reading xml with namespace (i.e. xml for compound widgets)

jleroux: I simply replaced tabs by spaces in Java files and removed this commented out line 
  <compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd">
in ExampleCompoundWidgets.xml

We decided to duplicate the simple-methods.xsd rather than updating all concerned files. Else we would have to update the attributes at document level for rest of the controllers, menus, forms, simple methods and screens. For example, in controller.xml, we would have to change 
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd”
to 
  xmlns="http://ofbiz.apache.org/sc” xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”>
But especially we would have to use the same syntax with namespaces prefixes than in ExampleCompoundWidgets.xml (see example above). This can be discussed because with auto-completion it's not a big deal, but could be overwhelming for existing custom projects...

James mentionned that "the schema location at compound-widgets.xsd is relative to the project...". I don't see any problems with that. We can keep as is as long as we maintain the relation (ie if the main XSDs are moved). Moreover with the previous addition of compound-widgets.xsd in widget-catalog.xml it seems all things work correctly (eg w/o the new *-ns.xsd yet committed, the auto-completion works well in ExampleCompoundWidgets.xml




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746302 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 16:48:09 +00:00
Jacques Le Roux 06245c53ae A fix for "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
The tests did not pass because of xmlrpc. Simply adding it in http.request-map.list in url.properties and like for SOAPService request setting <security https="false"/> does it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746254 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 08:39:07 +00:00
Jacques Le Roux 7531712225 A fix for "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
I just realised that the main change (the one in ConfigXMLReader.java, exposed in a comment in OFBIZ-6849) was not committed in r1745525. I guess it was because of tests I did for OFBIZ-4090, I certainly removed these changes then and forgot to put them back.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746159 13f79535-47bb-0310-9956-ffa450edef68
2016-05-30 17:40:10 +00:00
Jacques Le Roux 7df0fcda3a Fixes "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
Quoting Deepak on dev ML

Hi Jacques,

I think in fop.xconf file we have to keep http url, as FOP does not support
https baseUrl for external graphics due to certificate issue (not remember
exact reason).

{code}
 <!-- Base URL for resolving relative URLs -->
-  <base>http://localhost:8080</base>
+  <base>https://localhost:8443</base>
{code}

If we set the https as <base> than images will not be rendered. Please
refer
http://demo-trunk-ofbiz.apache.org/ordermgr/control/order.pdf?orderId=DEMO10091

and we get following error on console:
{code}

     [java] 2016-05-27 13:51:48,308 |http-nio-8443-exec-3 |FOUserAgent
              |E| Image not found. URI: /images/ofbiz_logo.gif. (No context
info available)

{code}
If we set the http url than its working fine.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745732 13f79535-47bb-0310-9956-ffa450edef68
2016-05-27 09:52:51 +00:00
Jacques Le Roux e7cdb8a30d Implements "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
All tests passes and the normal use of OFBiz seems to work

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745525 13f79535-47bb-0310-9956-ffa450edef68
2016-05-25 18:02:23 +00:00
Jacques Le Roux 6d5dd1c5ba Things got totally wrong with r1742196 which contained much more than expected.
This reverts things which should not have been committed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1742197 13f79535-47bb-0310-9956-ffa450edef68
2016-05-03 21:03:11 +00:00
Jacques Le Roux 31ef1f9186 "Continue the work on the form widget grid element" - https://issues.apache.org/jira/browse/OFBIZ-7029
Completes in screens the changes done in forms at r1741873. I then replaced few form lists by grids, where it was possible to do it with regexp.
Also complete StatsForms.xml to use only grids and "searchList" form in ecommerce ContentForms to NOT use grid (not called in screen)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1742196 13f79535-47bb-0310-9956-ffa450edef68
2016-05-03 20:50:10 +00:00
Jacques Le Roux 9d6072b3d8 Changes for "Use SecureRandom instead of Random where appropriate, and randomUUID for externalKey" - https://issues.apache.org/jira/browse/OFBIZ-7028
Because using SecureRandom comes with a cost, I have identified the places where it's reasonable to keep the non secured Random (like tests, internal sequences, etc.).
Ant to use UUID.randomUUID to generate the external link id

Also, though there are no real proven vulnerabilities, I decided to backport as much as possible since it's now public.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1741684 13f79535-47bb-0310-9956-ffa450edef68
2016-04-29 18:54:49 +00:00
Jacques Le Roux 3168a01d10 A patch from Swapnil M Mane for "Calling Groovy as Event generates error when delegator.find used" reported by Wai at https://issues.apache.org/jira/browse/OFBIZ-6808
We are using Groovy as event in the controller request, everything works fine for us but as we used delegator.find()
it generates the following error


ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
     [java] java.lang.Exception: Stack Trace
     [java] 	at org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1757) [ofbiz-entity.jar:?]
     [java] 	at org.ofbiz.entity.Delegator$find.call(Unknown Source) [ofbiz-entity.jar:?]
     [java] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [groovy-all-2.2.1.jar:2.2.1]
     [java] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [groovy-all-2.2.1.jar:2.2.1]
     [java] 	at ProductInventory$_run_closure1.doCall(ProductInventory.groovy:18) [script:?]

Reason: 

Since we are using find method of GenericDelegator.java
As per the code implementation it required the transaction should exist 
   if (!TransactionUtil.isTransactionInPlace()) {
if not, it generate error
    ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Solution: initialize the transaction when the groovy is called as event and commit the transaction after the completion.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740629 13f79535-47bb-0310-9956-ffa450edef68
2016-04-23 03:51:13 +00:00
Jacques Le Roux 7b82a482e2 A combined patch from Adrian's, James Yong's and my work for "Add Support For Compound Screen Widget XML Files" - https://issues.apache.org/jira/browse/OFBIZ-4090 and "Add Example for Compound Screen Widget" - https://issues.apache.org/jira/browse/OFBIZ-6990
Adrian: This adds the ability to include screen widgets, form widgets, menu widgets, and simple methods in a single XML file. This approach could be used in situations where the widgets share a logical grouping - so they can be kept in one place.

James: An example to test out Compound Screen Widget

jlerouxc: here are the changes and tests globally
# As James mentionned we no longer need *-v2.xsd files, I removed them from Adrian's patch
# I created a compound-widgets.xsd based on Adrian's and James Yong's previous work. From Paul Foxworthy's comment in OFBIZ-4090, I decided to name the root compound-widgets (hence the file name). I arranged its elements in another way, see below with ExampleCompoundWidgets.xml
# I slightly modified James Yong's ExampleCompoundScreenWidget.xml file and renamed it ExampleCompoundWidgets.xml. I added an "s" because there are several OFBiz widgets gathered in one place. For the modifications: I simply changed the names and arranged the elements in another way which I find better suited. I'm used to 1st create the query, then the menus, the screens and their forms. We rarely use widget-trees but it's there also. Finally the simple-method at end if any. The order is not enforced though, so everybody can use her/his own :)
# I added a French label
# I completed the widget-catalog.xml with this new entry and tested locally in Eclipse by reloading the XML catalog entries.

I hope I did not miss nor mixed things, the local instance I used is a bit overcrowded with pending changes...




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738958 13f79535-47bb-0310-9956-ffa450edef68
2016-04-13 15:38:16 +00:00
Jacques Le Roux c64517519b A slightly modified patch from Chatree Srichart for "Upgrade Tomcat to 8.0.32" https://issues.apache.org/jira/browse/OFBIZ-6915
jleroux: I simply changed the doc link in catalina ofbiz-component.xml


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738902 13f79535-47bb-0310-9956-ffa450edef68
2016-04-13 07:40:25 +00:00
Jacques Le Roux 4ecbb21ee0 Partial improvement for "Remove from trunk the deprecated code if deprecated before December 2014" https://issues.apache.org/jira/browse/OFBIZ-6273
Replaces the deprecated StAXSOAPModelBuilder(XMLStreamReader) and StAXOMBuilder(reader) in SOAPEventHandler.java. I did not find how to test though...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737789 13f79535-47bb-0310-9956-ffa450edef68
2016-04-05 06:57:54 +00:00
Jacques Le Roux eff5999d61 A patch from James Yong for <<Unable to change language in ecommerce>> https://issues.apache.org/jira/browse/OFBIZ-6966
Problem
=======
Go to http://localhost:8080/ecommerce/
Change the language dropdown from English to another language will revert back to English. I am using SVN revision 1735923

jleroux: This was due to  OFBIZ-6879 ("Remove forceHttpSession feature"). Now as soon as you start with HTTPS instead of HTTP it works. I mean other links don't get back on HTTP, see OFBIZ-6966 for details... More to come with OFBIZ-6849, hopefully soon...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737046 13f79535-47bb-0310-9956-ffa450edef68
2016-03-29 20:44:30 +00:00
Jacques Le Roux 806be00fc5 No functional change: I put a dot just before, so better with a Capital!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1729349 13f79535-47bb-0310-9956-ffa450edef68
2016-02-09 10:31:28 +00:00
Jacques Le Roux 9d58ec2a48 Implements "Hide sessionId in logs by default, show them using a properties" - https://issues.apache.org/jira/browse/OFBIZ-6886
There are few cases where we show the sessionId in logs (using UtilHttp.getSessionId()  in or HttpSessionEvent.getSession().getId()) in other places)
Despite we secured the log access at r1489461, I feel better using a properties to opt in, false by default.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1729348 13f79535-47bb-0310-9956-ffa450edef68
2016-02-09 10:26:26 +00:00
Jacques Le Roux f9928cbc55 Since
r1727987: Removes the forceManualJsessionid feature - OFBIZ-6867 
and
r1728121: Gets rid of the session-cookie-accepted feature - OFBIZ-6871
are done we can remove the now useless cookies variables, this does it


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1728660 13f79535-47bb-0310-9956-ffa450edef68
2016-02-05 13:18:44 +00:00
Jacques Le Roux 82cecfdfcc Removes forceHttpSession feature - https://issues.apache.org/jira/browse/OFBIZ-6879
We should always use HTTPS as explained at OFBIZ-6849

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1728381 13f79535-47bb-0310-9956-ffa450edef68
2016-02-03 22:07:10 +00:00
Jacques Le Roux fffc684891 Removes all sessionsIds put in URLs - https://issues.apache.org/jira/browse/OFBIZ-6872
We should always use sessionIds in cookies and newer have sessionsIds in URLs. So I will remove all sessionsIds in URLs. There are 2 cases:

* the part related to spiders in RequestHandler
* HtmlFormRenderer.appendExternalLoginKey() (there is also an appendExternalLoginKey method in MacroFormRenderer class but it's not used OOTB)

I also removed some old commented out code in RequestHandler class

There are also many cases where we show the sessionId in logs (using UtilHttp.getSessionId()) I wonder if we should not keep those commented out or change the debug info level. Also HttpSessionEvent.getSession().getId() is directly used in some places for the same purpose (log)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1728375 13f79535-47bb-0310-9956-ffa450edef68
2016-02-03 21:09:28 +00:00
Jacques Le Roux 0e7c4d0a5c Removes the forceManualJsessionid feature - https://issues.apache.org/jira/browse/OFBIZ-6867
This follows Scott's comment at https://issues.apache.org/jira/browse/OFBIZ-6111?focusedCommentId=15076677

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1727987 13f79535-47bb-0310-9956-ffa450edef68
2016-02-01 18:30:43 +00:00
Deepak Dixit f037b221f9 (OFBIZ-6655) Reverted r1719762, as system fails to find the session cookie for ecommerce, will debug it in more detail but for now to fix this issue reverting r1719762.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1722379 13f79535-47bb-0310-9956-ffa450edef68
2015-12-30 17:00:00 +00:00
Jacques Le Roux 7297da68a9 5th step for "Secure HTTP headers" https://issues.apache.org/jira/browse/OFBIZ-6766
X-XSS-Protection

This header enables the Cross-site scripting (XSS) filter built into most recent web browsers.
It's usually enabled by default anyway, so the role of this header is to re-enable the filter for this particular website if it was disabled by the user.
This header is supported in IE 8+, and in Chrome (not sure which versions). The anti-XSS filter was added in Chrome 4. Its unknown if that version honored this header.
FireFox has still an open bug entry and "offers" only the noscript plugin.
https://wiki.mozilla.org/Security/Features/XSS_Filter
https://bugzilla.mozilla.org/show_bug.cgi?id=528661

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1720213 13f79535-47bb-0310-9956-ffa450edef68
2015-12-15 18:12:05 +00:00
Jacques Le Roux 95702618c5 Reapplies r1719762 because of OFBIZ-6655
This for 3 reasons:

1) Tomcat protects the cookies which it cares about (session and SSO cookies) but not all. Notably the OFBiz specific cookies, like visitorCookie. I guess also trackableCookie, billableCookie, siteIdCookie, updatedTimeStampCookie, guestShoppingListCookie, usernameCookieName and autoLoginCookie are not secured with The data in those cookies are less sensible than jsessionId but anyway it's safer to have them all secured.
2) I don't want to debug the ecommerce issue I reported in OFBIZ-6655. And if I don't use the sessionConifg_ecommerce.patch but rather reapply r1719762 then it's OK (if I also locally revert r1686574 done for OFBIz-6111, still waiting on this one...)
3) I see no reasons why someone would not want her cookies secured, as recommended by OWASP and others


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719939 13f79535-47bb-0310-9956-ffa450edef68
2015-12-14 15:28:54 +00:00
Jacques Le Roux 4885f653af Reverts r1719762 because of OFBIZ-6655
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719764 13f79535-47bb-0310-9956-ffa450edef68
2015-12-13 05:47:33 +00:00
Jacques Le Roux 677b49015e 4th step for "Secure HTTP headers" https://issues.apache.org/jira/browse/OFBIZ-6766
The secure flag on cookies instructs the browser to only submit the cookie as part of requests over secure (HTTPS) connections. This prevents the cookie from being observed as plain text in transit over the network.
The HttpOnly flag instructs the browser that this cookie can only be accessed when sending an HTTP request. This prevents scripts running as part of a page from retrieving the value and is a defense against XSS attacks.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719762 13f79535-47bb-0310-9956-ffa450edef68
2015-12-13 05:07:47 +00:00
Jacques Le Roux 64da8f75f8 Of course one more time I forgot to save after fixing a typo :/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719683 13f79535-47bb-0310-9956-ffa450edef68
2015-12-12 13:01:55 +00:00
Jacques Le Roux fde61d402a 2nd step for "Secure HTTP headers" https://issues.apache.org/jira/browse/OFBIZ-6766
Adds X-Content-Type-Options. According to Wikipedia and Owasp, the only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719682 13f79535-47bb-0310-9956-ffa450edef68
2015-12-12 12:58:18 +00:00
Jacques Le Roux 4c593a6d33 1st step for "Secure HTTP headers" https://issues.apache.org/jira/browse/OFBIZ-6766
Here are X-Frame-Options and Strict-Transport-Security, just a start...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1719660 13f79535-47bb-0310-9956-ffa450edef68
2015-12-12 11:37:56 +00:00
Jacques Le Roux 0dd553ec96 A modified patch from Harsha Chadhar for "New feature to reclaim a user account - Using Security Questions" https://issues.apache.org/jira/browse/OFBIZ-4983
jleroux: the issue description is quite lengthy so I will summarise it here, please refer to the Jira issue for details.
"When a customer creates an account on eCommerce site, s/he will also need to answer a security question. This security question then can be used by the user to reclaim her/his account in case s/he forgets her/his password. If the user correctly answers the required security question while reclaiming her/his account, her/his password will be sent through email notification. This part would work in the same way as the existing functionality of email password (forget password)."

The description was actually more ambitious (several questions, possibility for users to create own questions) but AFAIK these parts have not been implemented.

Apart updating the patch which did not merge, I got 2 majors issues (and few others I will not report here) I bypassed with workarounds.

Unlike Harsha, and as I reported earlier in the issue, I never got the username (userLoginId) back when using hidden parameters in the request body (not in requestParameters, ie UtilHttp.getParameterMap(request)), nor actually any parameters. This is maybe due to my OS (Windows7 was XP before) or my email client (Outlook Express then, now Thunderbird) or even my SMTP configuration (I used my ISP SMTP server) but most probably because I did it all on my sole machine (localhost). I tried to understand what was happening to request body parameters with http://www.telerik.com/fiddler, but finally gave up because it's even more complicated when https is in the picture. So I decided to rather use parameters in the URL (Query string). It's a bit less safe, though the password is OFBiz encrypted, and should be replaced. But it's safe enough because only the user should receive this message and even if the message is sniffed during its journey it should be hard to decrypt the password!

Harsha used the SecurityExtUiLabels.xml (created by ashish at r1618415) in securityext component but there is already a SecurityextUiLabels.xml in common component. Since I use Windows OFBiz was unable to retrieve the labels from SecurityExtUiLabels.xml since I guess it looked into a SecurityextUiLabels.xml. So I renamed a SecurityExtUiLabels.xml to EmailPassword.xml.










git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716915 13f79535-47bb-0310-9956-ffa450edef68
2015-11-27 20:37:15 +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 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 87f4513d2b A modified patch from Pierre Smits for "Remove superfluous .properties extension from EntityUtilProperties requests" https://issues.apache.org/jira/browse/OFBIZ-6719
Currently many EntityUtilProperties requests have the .properties extension in the parameters for the resource, but this is not needed as it is stripped later on.

jleroux: I found 5 others, replaced also


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713985 13f79535-47bb-0310-9956-ffa450edef68
2015-11-12 09:22:38 +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
Arun Patidar 3865ff485d [OFBIZ-6171] Applied patch from Pierre Smits for replacing 'Open for Business' references with 'Apache OFBiz'.Thanks Pierre for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706589 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 14:15:21 +00:00
Jacques Le Roux faed9fe69d A patch from Pierre Smits for "Update site-conf.xsd to prioritise Groovy over BSF" https://issues.apache.org/jira/browse/OFBIZ-6597
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1701150 13f79535-47bb-0310-9956-ffa450edef68
2015-09-04 03:51:55 +00:00
Deepak Dixit b43c43d7d2 (OFBIZ-6572) Fixed character encoding issue if multitenant is set to Y, move the setCharacterEncoding and setAttributesFromRequestBody method before the multitenant block in ContextFilter, as multitenant block reading the tenatId form request parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1695017 13f79535-47bb-0310-9956-ffa450edef68
2015-08-10 10:45:49 +00:00
Shi Jinghai e173523638 Comment out
Debug.logInfo("======save last view: " + session.getAttribute("_LAST_VIEW_NAME_"));


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693417 13f79535-47bb-0310-9956-ffa450edef68
2015-07-30 12:33:05 +00:00
Shi Jinghai 89f0ba788b OFBIZ-6552 - Error when changing language after using the product jump from the left part of the main product screen
Add a check on whether viewName is empty to view-last branch. If it's empty, try to use the value in the response config if it exists.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1693231 13f79535-47bb-0310-9956-ffa450edef68
2015-07-29 09:55:24 +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 1054bfa97c Fixes the way the FOP baseUrl was set. This was due to a change introduced for "Allow FOP to support <fo:external-graphic></fo:external> for -Dportoffset" at https://issues.apache.org/jira/browse/OFBIZ-6120
Thanks to Deepak's report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1677123 13f79535-47bb-0310-9956-ffa450edef68
2015-05-01 12:08:59 +00:00
Jacques Le Roux 23c89bab02 This defines the NotoSans font as default for report and FOP-PDF examples
With NotoSans by default, no need to specify the NotoSans "font-family" to write special characters in examples PDF (including content called from example).
This already worked in reports because of "fop.font.family=NotoSans" in fop.properties. It's also the way to use for custom reports.

I also added <auto-embed/> like we have <auto-detect/> but I'm unsure of what it does exactly (I suppose it embeds the fonts glyphs in the PDF) because the FOP documentation is unclear about it (to say the least). If someone knows better please chime in!

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1675061 13f79535-47bb-0310-9956-ffa450edef68
2015-04-21 08:03:41 +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
Deepak Dixit 15be736b7a Applied patch from jira issue OFBIZ-6222 - Change the field name 'tenantId' to 'userTenantId' from login page and ContextFilter
Thanks  Arun Patidar for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672853 13f79535-47bb-0310-9956-ffa450edef68
2015-04-11 09:43:10 +00:00
Deepak Dixit 4f6f1e6a9f Applied patch from jira issue OFBIZ-6205 - Use EntityUtilProperties to get the WebSiteProperties
Thanks  Arun Patidar for reporting the issue and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672846 13f79535-47bb-0310-9956-ffa450edef68
2015-04-11 08:50:42 +00:00
Jacopo Cappellato fb0f2d3d1d Fix for bug reported by Eric de Maulde in OFBIZ-5035: character encoding issue happening in the ecommerce application; the issue was caused by the CatalogUrlFilter and ContentUrlFilter because, under special conditions, they are preventing the ContextFilter (where encoding is set) to be executed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672430 13f79535-47bb-0310-9956-ffa450edef68
2015-04-09 17:33:44 +00:00