(OFBIZ-11947)
This is done for applications component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
In Java SE 7 and later, a single catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.
Thanks: Jacques for the review.
(OFBIZ-11320)
When changing the password of a User Login through the Party Manager the Require Password Change dropdown menu selection does not save the selected value. The corresponding process is missing from the LoginMapProcs.xml.
Thanks: Ingo Könemann for your contribution.
We currently have two ways to define component loading order. Either
by using ‘depends-on’ attribute in “component-config.xml” or by adding
a “component-load.xml” file at the root of a component directory.
“depends-on” is more flexible because it handles partial ordering when
“component-load.xml” defines a total order which is not necessarily
meaningful, so it is better to rely only “depends-on”.
This removes the usage of “component-load.xml” to use ‘depends-on’
instead. The dependency declarations correspond to the total ordering
previously defined but will need to be refined in the future to relax
unnecessary dependency declarations.
Only “framework/base/config/component-load.xml” which defines the
top-level directories order (framework, applications, themes and
plugins) is kept.
(OFBIZ-4361)
OFBiz contains a nice process to generate link through WebSite entity.
Unfortunately when you send an email, the standard service didn't propage the website
to the body content email, so we can't use it.
This improvement is needed on forgot password process to resolve the correct uri
and go back on good OFBiz component: where the user requested for a new password.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867960 13f79535-47bb-0310-9956-ffa450edef68
(including admin) via "Forget Your Password"
(OFBIZ-4361)
Currently, any user (via ecommerce "Forget Your Password") has the ability to
reset another users password, including "admin" without permission.
By simply entering "admin" and clicking "Email Password", the following is
displayed:
The following occurred:
A new password has been created and sent to you. Please check your Email.
This now forces the user of the ERP to change their password.
It is also possible to generate a dictionary attack against ofbiz because there
is no capta code required. This is serious security risk.
I have modified the patch following comments I made in the Jira, notably
Removed unused Java variables
Removed a check in LoginEvents::forgotPassword which prevented to show error
messages
Changed fr and en SecurityExtPasswordSentToYou
+ SecurityExtThisEmailIsInResponseToYourRequestToHave labels
+ template PasswordEmail.ftl
+ loginservices.token_incorrect labels
Added fr and en SecurityExtIgnoreEmail + SecurityExtLinkOnce labels
Removed changes in general.properties
I did not remove the 2 GetSecurityQuestion.ftl files (webpos one was still in)
There is still room for improvement. I'll discuss them on the Jira and dev
ML. But this version is already strong enough to not wait that the patch is
inapplicable!
Thanks: mz4wheeler (Mike Z) for the Jira, Nicolas Malin for the patch, I guess
with some Gil's help, and all others for comments and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866478 13f79535-47bb-0310-9956-ffa450edef68
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
(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
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
(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
(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
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
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
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
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
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
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
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