Commit Graph
674 Commits
Author SHA1 Message Date
Jacopo Cappellato 2facce9042 Improved: a series of cleanup mostly related to no more necessary handling of
default encoding for the requests and some fine tuning of ControlFilter 
settings; removed no more used code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761424 13f79535-47bb-0310-9956-ffa450edef68
2016-09-19 12:03:13 +00:00
Jacopo Cappellato 794a4dfbbb Implemented: removed the "controller" related logic, that is now provided by the
new ControlFilter, from the ContextFilter; modified existing applications to use 
the two filters in a chain; removed from the other specialized filters all the 
logic that was duplicated or extended from ContextFilter.

A web application, in order to leverage the OFBiz framework, requires that a 
series of objects are in its contexts (servlet context, session and request) 
such as "delegator", "delegatorName", "dispatcher", "security" etc. etc...
This setup is performed by the logic contained in the servlet filter implemented 
by the ContextFilter class.
The execution of this logic is required for the application to run properly.
However, before this commit, in the ContextFilter there was other logic, related 
to access control and redirection rules (some of them performed in coordination 
with the ControlServlet), making it difficult to deploy this filter in all the 
web applications, especially the ones that implement special handling of paths.
In fact, this filter was deployed in most but not all the web application in the 
OFBiz codebase: specifically it was not deployed in web applications that 
require the execution of other filters (e.g. CatalogUrlFilter, etc...) like the 
ones in the "ecommerce" and "solr" components.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761304 13f79535-47bb-0310-9956-ffa450edef68
2016-09-18 08:08:30 +00:00
Ashish Vijaywargiya e22c43c132 Improved: Enhance Event Handler to support an transaction-timeout attribute in the <event> element.
(OFBIZ-8160)
Thanks: Ravi for the contribution. Thanks Jacopo for your comment, it was very helpful.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761234 13f79535-47bb-0310-9956-ffa450edef68
2016-09-17 13:38:23 +00:00
Pranay Pandey cbc10832b2 Implemented: Multisite support in specialpurpose/cmssite
(OFBIZ-7120)

This is the first patch from the ticket and is for the implementation done to support the multisite feature in specialpurpose/cmssite component.

Thanks Mohammed Rehan Khan for the contribution.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761150 13f79535-47bb-0310-9956-ffa450edef68
2016-09-17 08:03:19 +00:00
Jacopo Cappellato 4a7d46bedb Improved: modified classes to use the FORWARDED_FROM_SERVLET constant
defined in the new ControlFilter class.

The old constant defined in ContextFilter will soon be removed together with the 
debug field, that is not currently used.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760949 13f79535-47bb-0310-9956-ffa450edef68
2016-09-15 15:35:05 +00:00
Jacopo Cappellato 0c5542f631 Improved: non functional improvements to the new ControlFilter class.
Modified the rdering of import statements, minor changes to remove some 
unnecessary dependencies on util classes. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760947 13f79535-47bb-0310-9956-ffa450edef68
2016-09-15 15:23:23 +00:00
Jacopo Cappellato 65139a1704 Implemented: New servlet filter that provides all the "controller" related logic
currently available in the ContextFilter.

At the moment the filter is not used but, once the "controller" logic will be 
removed by the ContextFilter, the applications' web.xml files  will be updated 
to deploy the two filters in a chain:
* ControlFilter will filter and redirect requests
* ContextFilter will set the required objects in the contexts (session and 
request) like the delegator, dispatcher etc...
This separation of concerns will make the deplyment more flexible when 
additional filters are required.
While the logic in this new filter is functionally mostly the same of that 
currently in ContextFilter, this new implementation is more efficient and the 
behavior and configuration parameters are clearly discribed.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760725 13f79535-47bb-0310-9956-ffa450edef68
2016-09-14 15:29:53 +00:00
Jacopo Cappellato 828d5b159f Improved: set the character encoding to the system default (UTF-8) if and only
if it is not set already by the client.

Before this change the filter used to override the character encoding, even if 
it was specified in the http request.
Also removed some unused imports and comments.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760528 13f79535-47bb-0310-9956-ffa450edef68
2016-09-13 10:55:12 +00:00
Jacopo Cappellato a9835e4825 Improved: Removal of support for the Bean Scripting Framework (BSF).
(OFBIZ-8224)

This commit removes the support for the Bean Scripting Framework (BSF) from the OFBiz framework:
no application code was using this since several years and there are better and more modern tools at the present time.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760384 13f79535-47bb-0310-9956-ffa450edef68
2016-09-12 14:53:47 +00:00
Jacopo Cappellato 43211780f8 Minor improvements, with no functional changes: made fields and methods private, moved variables into inner scope.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759578 13f79535-47bb-0310-9956-ffa450edef68
2016-09-07 10:32:47 +00:00
Jacopo Cappellato 9778235247 OFBIZ-8142 Additional cleanups related to OFBiz servlet filters
* introduced a constant for the "control" mount point
* moved public fields and methods from the ContentUrlFilter to the OfbizContentAltUrlTransforms and made them private (since they are only used by this class)
* no more need for the UrlServletHelper to extend the ContextFilter



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759368 13f79535-47bb-0310-9956-ffa450edef68
2016-09-06 07:09:03 +00:00
Jacopo Cappellato 948dbc646c OFBIZ-8142 A series of cleanups related to OFBiz servlet filters:
* removed an unused filter (UrlRegexpContextFilter)
* moved a series of methods from ContextFilter to WebAppUtil, where they make more sense; changed one of them to be a static method
* made private some methods of ContextFilter and WebAppUtil because they were not used outside of their classes



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759332 13f79535-47bb-0310-9956-ffa450edef68
2016-09-05 16:56:04 +00:00
Mridul Pathak db98226bf3 [OFBIZ-7529] Part 3 of "Delete stale java files from applications and framework". Deleted following files/directories, their references and example implementations -
framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java
framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/JasperReportsPdfViewHandler.java
framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java
framework/webapp/src/main/java/org/apache/ofbiz/webapp/view/JasperReportsXmlViewHandler.java

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1754636 13f79535-47bb-0310-9956-ffa450edef68
2016-07-31 06:58:39 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb b37ef2d280 Migrate ALL java files from /src to /src/main/java - OFBIZ-7790
This is the first of two steps in the above mentioned JIRA. This
first step changes the java source directory for every component
from /src to /src/main/java. The next step will be adding unit
tests to every component in /src/test/java

Thank you to Deepak Dixit for tips on how to use the SVN commands
to make the appropriate file moving.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00
Jacopo Cappellato 539084a511 OFBIZ-7763 Removed a series of artifacts dependent on the old Beanshell jar that is going to be removed from the project; specifically:
* removed the code that implemented the deprecated "call-bsh" operation in Minilang
* removed the BeanShellContainer (it has been disabled a long time ago)
* removed the BeanShell service engine, no more used


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751947 13f79535-47bb-0310-9956-ffa450edef68
2016-07-08 17:53:59 +00:00
Arun Patidar bd0472e263 Applied patch from jira issue - OFBIZ-7589 - Enforce noninstantiability to UtilHttp class. Thanks Rishi Solanki and Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751026 13f79535-47bb-0310-9956-ffa450edef68
2016-07-02 05:56:47 +00:00
Arun Patidar 103115895f Applied patch from jira issue - OFBIZ-7466 - Enforce noninstantiability to ProtectViewWorker Class. Thanks Pratik Kulshreshth for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750648 13f79535-47bb-0310-9956-ffa450edef68
2016-06-29 14:07:41 +00:00
Arun Patidar 77dbb2851c Applied patch from jira issue - OFBIZ-7459 - Enforce noninstantiability to ApacheFopWorker Class. Thanks Rishi Solanki and Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750534 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 15:10:51 +00:00
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 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 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 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
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