Commit Graph
192 Commits
Author SHA1 Message Date
Jacques Le Roux ebc72d0e65 Improved: no functional change.
As annouced on dev ML removes unused code related to rememberMe.

I noticed this block of code in LoginEvents::storeLogin

        if ("Y".equals(request.getParameter("rememberMe"))) {
            setUsername(request, response);
        }

It was added by Andrew long ago: https://markmail.org/message/dmqqxse65inh6amr
But rememberMe is never created  in code so LoginEvents::setUsername is never used.
This removes this  block of code and the 2 related methods below.

Also automatically clean imports

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846221 13f79535-47bb-0310-9956-ffa450edef68
2018-11-09 09:32:56 +00:00
Gil Portenseigne ceea6ce791 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Rishi Solanki b8889e7f6f Improved: Move all data in applications to the datamodel component. Removed unused files as no data in it.
(OFBIZ-9501)
Thanks Sourabh Jain for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823182 13f79535-47bb-0310-9956-ffa450edef68
2018-02-05 14:39:43 +00:00
Rishi Solanki 5a49b98d3a Improved: Move all data in applications to the datamodel component. Moved demo data from accounting, commonext, content, humanres, manufacturing, marketing, order, party, product, workeffort components to datamodel component. Done changes in related data files and do entries accordingly.
(OFBIZ-9501)
Thanks to Sourabh Jain for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823177 13f79535-47bb-0310-9956-ffa450edef68
2018-02-05 14:13:04 +00:00
Jacques Le Roux 297371b526 Improved: Handle service response effectively
(OFBIZ-9981)

As per discussion on Dev ML:
==========================
Every service calling from java/groovy must handle errors by service util 
methods such as isError, returnError etc. 
and similarly in case of XML <call-service, there should be <check-error/> 
to make sure service was executed successfully.

Apart from this, one suggestion is to include *Debug.logError* in 
*ServiceUtil.returnProblem* so that in case of any error occurred and handled, 
it will always be logged on the console.
==========================

jleroux: this is the applications part with some slight changes

Thanks: Suraj Khurana and Anushi Gupta

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819730 13f79535-47bb-0310-9956-ffa450edef68
2017-12-31 11:11:46 +00:00
Jacques Le Roux 40e8be83df Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818010, there were much more cases.
Also few tabs automatically replaced by spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818020 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 14:11:38 +00:00
Jacques Le Roux e0d2057456 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

We discussed on this point: http://markmail.org/message/mplvusuqn7oshl4v 
and we agreed about better doing a check when using Debug.logVerbose().

I checked there are 300+ cases like that. Since it's an easy S/R 
This implements it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Michael Brohl 1ff18fc898 Improved: General refactoring and code improvements, package
org.apache.ofbiz.securityext.login.
(OFBIZ-9868)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817745 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 06:43:03 +00:00
Jacques Le Roux 8b69ba0f73 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.securityext.login.
(OFBIZ-9637)

No functional change, missed a compilation issue, 

Thanks: Builbot :)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1815195 13f79535-47bb-0310-9956-ffa450edef68
2017-11-14 10:06:46 +00:00
Jacques Le Roux c5a9b7347e Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.securityext.login.
(OFBIZ-9637)

No functional change.

I prefer to use URLEncoder.encode(reqParam, "UTF-8") rather than ESAPI HTML 
encoder for 3 reasons:
*  URLEncoder.encode() is sufficient to answer to HTTP response splitting using 
  	Percent-encoding (aka  URL encoding)
*  Consistent and simpler code using basic Java
*  Using "UTF-8" is (more than) recommended, see 
	https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html
	
I will check what using ESAPI HTML encoder entails. As JavaDOc says "Not doing 
so  may introduce incompatibilities." We have 30+ cases, they are maybe OK, but
we need to check...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1815192 13f79535-47bb-0310-9956-ffa450edef68
2017-11-14 09:33:19 +00:00
Jacques Le Roux a09fc01405 Reverted: Secure the login.secret_key_string
(OFBIZ-9966)

Before having a discussion about the security of this, reverts on 
Michael's request on dev ML 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814392 13f79535-47bb-0310-9956-ffa450edef68
2017-11-06 10:51:57 +00:00
Jacques Le Roux 9d31ccb222 Documented: Secure the login.secret_key_string
(OFBIZ-9966)

No functional change, this completes the previous commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814362 13f79535-47bb-0310-9956-ffa450edef68
2017-11-05 17:27:01 +00:00
Jacques Le Roux 8289e03096 Fixed: Secure the login.secret_key_string
(OFBIZ-9966)

When OFBIZ-4983 was implemented I missed that we put the login.secret_key_string
 as a property in security properties. This should not have been because it 
eases attackers work.

The recommended way is to have it as a private static final String that can be 
changed just when compiling using sed and uuidgen. So then the key is temporay 
and final and it gets quite harder for a possible attacker to use this mean.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814349 13f79535-47bb-0310-9956-ffa450edef68
2017-11-05 11:28:42 +00:00
Rishi Solanki 9b848c5f4d Improved: Move all data in applications to the datamodel component. Remove unused files and added additional files to maintain all component data.
(OFBIZ-9501)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813726 13f79535-47bb-0310-9956-ffa450edef68
2017-10-30 05:57:21 +00:00
Rishi Solanki 42cc28f78e Improved: Move all data in applications to the datamodel component. Moved seed and seed-initial data from party, content, security ext and work effort component. Left with few data changes which can be moved to some plugins or confusing. Will share the data over community and proceed accordingly once base effort is complete. Thanks Sourabh Jain, Saurabh Dixit and Prakhar Kumar for your contribution.
(OFBIZ-9501)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813724 13f79535-47bb-0310-9956-ffa450edef68
2017-10-30 05:33:32 +00:00
Michael Brohl e12e868551 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.securityext.login.
(OFBIZ-9637)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811430 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:19:29 +00:00
Jacques Le Roux d56833ae7c Improved: Add session tracking mode and make cookie secure
(OFBIZ-6655)

This is somehow related with OFBIZ-6655 because it's there that Deepak reverted
r1719762 (actually r1719939). It was right to do so at r1722379 for 
RequesHandler but not for the other files. Because it now does not handle 
security for cookies which are not session cookies. It's minor but still a risk,
notably for autoLoginCookie

This reapplies r1719762 for the other files to make other than session cookies
secure. I will not backport


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809687 13f79535-47bb-0310-9956-ffa450edef68
2017-09-26 07:17:40 +00:00
Divesh Dutta 8e8272b4fa Improvement: Generic value is null or not should be checked using native checks. Utility method isEmpty or isNotEmpty is not needed to check if generic value is null or not because generic values can never be empty. They can be null or not nulls. So made changes accordingly all over the places.
(OFBIZ-8471)

Thanks: Ratnesh Upadhyay for reporting the improvement and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768192 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:27:46 +00:00
Deepak Dixit b150af15ea Improved: UtilValidate isEmpty and isNotEmpty methods not used correctly
(OFBIZ-8413)

Thanks Pawan Verma for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1766868 13f79535-47bb-0310-9956-ffa450edef68
2016-10-27 19:21:41 +00:00
Jacques Le Roux 7e5a0db5df No functional change, renames files:
conditional.xml to conditionalLabels.xml
DefaultMessages.xml to DefaultMessagesLabels.xml
EmailPassword.xml to EmailPasswordLabels.xml
Found while working on OFBIZ-8321

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1764261 13f79535-47bb-0310-9956-ffa450edef68
2016-10-11 14:56:49 +00:00
Ashish Vijaywargiya 99271ae91e Applied patch from jira issue - OFBIZ-8023 - Clean up commented out code in Free Marker Template for SecurityExt.
Thanks Aman for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758004 13f79535-47bb-0310-9956-ffa450edef68
2016-08-27 12:08:03 +00:00
Jacques Le Roux ef7996c983 Fixes "Remove warnings regarding missing component lib folders" - https://issues.apache.org/jira/browse/OFBIZ-7776 - by cleaning/clearing the references to non existent/empty dirs.
Notes: 
* Also removes empty framework/base/lib/scripting and useless applications\content\lib\uno\README (miss doc in wiki)
* When jpim-0.1.jar will be (hopefully) replaced we can drop lib ref in framework/base/ofbiz-component.xml
* I wonder if we should let the geronimo component alone with only 2 classes, could we not put that in entity or entityext?
 
    



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755306 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 12:27:21 +00:00
Mridul Pathak 3c42c21eb4 [OFBIZ-7529] Part 2 of "Delete stale java files from applications and framework". Deleted following files/directories and references -
applications/securityext/src/main/java/org/apache/ofbiz/securityext/thirdparty
applications/securityext/src/main/java/org/apache/ofbiz/securityext/thirdparty/truition
applications/securityext/src/main/java/org/apache/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java
applications/securityext/config/truition.properties

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1754635 13f79535-47bb-0310-9956-ffa450edef68
2016-07-31 06:21:09 +00:00
Nicolas Malin 96ed02fae4 Create demo PartyStatus data for existing parties for applications component, thanks to Suraj Khurana for the submission through OFBIZ-7673
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1753797 13f79535-47bb-0310-9956-ffa450edef68
2016-07-22 14:22:32 +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
Taher A. Alkhateeb 4d2b415a91 Another major patch for OFBIZ-7534 replacing Ant with Gradle
This is the first patch that takes OFBiz to the point of no return
in terms of switching from Ant to Gradle build system. Specifically
this patch applies the following items:

- Delete all old Ant and Maven build scripts
- Delete 169 Jar libraries and replace them with remote ones in the
  gradle build script
- update the gradle build scripts for the dependencies and other minor
  changes needed for the script work correctly

All tests pass with the command ./gradlew cleanAll loadDefault testIntegration

Again, thank you for everyone who contributed valueble time and effort in this
process.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752033 13f79535-47bb-0310-9956-ffa450edef68
2016-07-09 18:10:19 +00:00
Jacques Le Roux 6e54fba04e A last slightly modified patch from James Yong for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
I have uploaded a patch for the simple methods schema.
In general, the top level attributes are converted to simpleType, and attributeGroups to complexType.

Changed the following attribute name
1. ‘field’ to ‘fieldType’
2. ‘level’ to ‘levelType'

Denormalize the following attributeGroups
1. attlist.compare
2. attlist.compare-field

Left attributeGroup ‘typeDefaultString’ unchanged, cos it doesn’t matter. Not in use, it seem.

jleroux: we also fixed an issue with 
<xs:element name="field" type="fieldType"/> 
to 
<xs:element ref="field"/>
In the patch 

And I found a small issue (not minilang related) in ExampleCompoundWidgets.xml
-            <sm:log message="CompoundWidgetsFunc runs" sm:level="info"/>
+            <sm:log message="CompoundWidgetsFunc runs" level="info"/>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750647 13f79535-47bb-0310-9956-ffa450edef68
2016-06-29 14:06:29 +00:00
Jacques Le Roux 642f42886e A temporary workaround for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
Reverts the simple method to use the original schema without namespace. "Duplicates" simple-methods.xsd in simple-methods-ns.xsd as we did, to get the simple-method namespace for compound-widgets.

For myself: when we will do the 3rd more elegant option (no schema duplication), have been changed also:
minilang-catalog.xml
compound-widgets.xsd


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749938 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 16:40:22 +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 c8ba932772 Fixes a "typo" in last commit for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
We used targetNamespace (should only be used in schema) instead of xsi:schemaLocation



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749634 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 05:58:26 +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 ec66e361e1 A big but straightforward commit for "Move minilang scripts from component://componentname/script/org/ofbiz to component://componentname/minilang" - https://issues.apache.org/jira/browse/OFBIZ-7267
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)

I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix 

I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to 
  "The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 14:04:30 +00:00
Deepak Dixit c5bd9d0ad8 (OFBIZ-7021) Renamed product and securityext component ftl file name from lower case to upper case pattern.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1743880 13f79535-47bb-0310-9956-ffa450edef68
2016-05-15 05:05:50 +00:00
Jacques Le Roux f2835ca2e9 Improves Amardeep's patch for OFBIZ-7058 - "New password set in forgot password workflow not works sometimes and gives error"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1743027 13f79535-47bb-0310-9956-ffa450edef68
2016-05-09 19:03:56 +00:00
Jacques Le Roux 76e8bb65cd A patch from Amardeep Singh Jhajj for "New password set in forgot password workflow not works sometimes and gives error" https://issues.apache.org/jira/browse/OFBIZ-7058
Sometimes, on clicking the reset password link from "New password sent" email we get a reset password page and on saving the new password we get following error. 
[java] org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@3ea85a47].
     [java] 	at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:462) ~[shiro-core-1.2.3.jar:1.2.3]
     [java] 	at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:445) ~[shiro-core-1.2.3.jar:1.2.3]
     [java] 	at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:390) ~[shiro-core-1.2.3.jar:1.2.3]
     [java] 	at org.apache.shiro.crypto.JcaCipherService.decrypt(JcaCipherService.java:382) ~[shiro-core-1.2.3.jar:1.2.3]
     [java] 	at org.ofbiz.entity.util.EntityCrypto$ShiroStorageHandler.decryptValue(EntityCrypto.java:282) ~[ofbiz-entity.jar:?]
     [java] 	at org.ofbiz.entity.util.EntityCrypto.doDecrypt(EntityCrypto.java:147) ~[ofbiz-entity.jar:?]
     [java] 	at org.ofbiz.entity.util.EntityCrypto.decrypt(EntityCrypto.java:126) ~[ofbiz-entity.jar:?]
     [java] 	at org.ofbiz.webapp.control.LoginWorker.login(LoginWorker.java:389) ~[ofbiz-webapp.jar:?]



I found that sometimes encrypted password string (Base64 String created from EntityCrypto's encrypt method) contain "+".
So on clicking the reset password link from email we get a reset password page and on saving the new password we get this error. The reason is "+" is converted to " " 
after url decoding. For example: Below URL having encrypted token with "+"

https://localhost:8443/partymgr/control/passwordChange?USERNAME=DemoUser&password=CcXuJ3vDfba0J7A8xO+X5A==&forgotPwdFlag=true&tenantId=

We can encrypt the token using URL encoder so that it is taken as it is in URL decoding.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1743025 13f79535-47bb-0310-9956-ffa450edef68
2016-05-09 18:53:40 +00:00
Deepak Dixit 50ffc15c80 (OFBIZ-6975) Applied patch from jira issue, moves the *.ftl files from webapp to template subfolders for securityext component.
Thanks  Pierre Smits for the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737781 13f79535-47bb-0310-9956-ffa450edef68
2016-04-05 06:28:40 +00:00
Jacques Le Roux 1e7d539a7a Removes old simple-methods.xsd from the trunk as it's useless now (was replaced by simple-methods-v2.xsd)
Also renames simple-methods-v2.xsd in simple-methods.xsd and replaces simple-methods-v2.xsd references by simple-methods.xsd references everywhere it's needed



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737087 13f79535-47bb-0310-9956-ffa450edef68
2016-03-30 09:13:03 +00:00
Deepak Dixit 10886a0252 (OFBIZ-5780) Fixed some compilation warning:
- Mark some SecurityFactory method as deprecated 
- Mark FoFormRender as deprecated
- Fixed deprecation warning for PassportUtil class.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1731377 13f79535-47bb-0310-9956-ffa450edef68
2016-02-20 11:46:08 +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 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 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 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