The LoginServices only specify that a user was not found, but it is of interest which user was not found.
I added that to the log message in the error case.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470391 13f79535-47bb-0310-9956-ffa450edef68
1. Make "password must be different from last passwords" function work. (--// FIXME: switching to salt-based hashing breaks this history lookup below)
2. When there's error occurs, return "requirePasswordChange" instead of "error". Then, "password change" form will not be redirected to "login" form if there's any kind of "error".
3. Fix one "deprecated" findByAnd call.
4. Return the "error" message instead of "event" message when password expires.
5. Chinese translation for "password expiration alert" and "password expired" message.
jleroux: I only reviewed (no tests) but seems good to me
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470127 13f79535-47bb-0310-9956-ffa450edef68
Reference requirement for the feature: http://markmail.org/message/sihxekwk6655t5gh#query:+page:1+mid:bcw2vva2hjxhsodq+state:results
For a user account in system, we can set password age for an additional security.
Proposed system will start suggesting to user to reset his password few days before password expiration. Then Once password expired, system will enforce him to reset his password before processing further.
Following will be control points and would be part of system configuration-
* *Control Points -*
** Admin can enable/disable the reset password functionality.
*** -It will control by a flag in propriety file where admin can enable/disable it by setting true/false.
** Number of days in which password will expired.
*** - It will defined in propriety file so that admin can control it.
** Number of days before when password expiration alert display at user's screen.
*** - It will defined in propriety file so that admin can control it.
* *How should it processed -*
** After user logged-in, display password expiration notification message to user if his password will expire in comming days.
** After user logged-in, display change password screen, when password is expired. i.e. The difference in days since last time password updated is exceed to number of days specified in system policies. Enforce user to reset his password.
* *What will be the out-put -*
** Password is about to expire : : alert message after login.
** Password is expired : Password-Expired-Alert : alert message with reset password screen.
Following is implementation plan -
security.properties : Provide configuration for following control points :
Enabling / Disabling of the functionality.
Maximum number of days within user has to change the password.
Number of days back to password expire date, when user start getting password expiration alerts.
Data model
Entity name : UserLoginPasswordHistory : Existing entity.
Business logic
Create UserLoginPasswordHistory record when a new user is created (if configured).
Expire and then Create UserLoginPasswordHistory record when user update existing password.
Everytime, when user login check for password expiration. If password expired then display change password screen to user. And if password not yet expired but it is close to expire display alert message to user about its expiration.
jleroux: I just changed
from
if (reqToChangePwdInDays != 0) {
tp
if (reqToChangePwdInDays > 0) {
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465185 13f79535-47bb-0310-9956-ffa450edef68
Provides an additional validation for password with following capability to the system:
Admin can enable/disable pattern based password capability of system. Configuration will reside in security.property file.
To enable : security.login.password.pattern.enable=true
To disable: security.login.password.pattern.enable=false
Admin is flexible to provide his pattern string by making pattern more/less restrictive as per system requirement. Configuration will reside in security.property file.
Example: security.login.password.pattern=^.*(?=. {5,})(?=.[a-zA-Z])(?=.[!@#$%^&*]).*$
Admin can provide custom error message string which will display to end user if wrong password is entered. Configuration will reside in security.properity file.
jleroux: I quickly handled the error message localisation for the OOTB case. It's more complicated when the pattern gets complex...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418996 13f79535-47bb-0310-9956-ffa450edef68
The email configuration setting mail.smtp.starttls.enable is ignored by the system.
I encountered this while configuring OFBiz an email server which had TLS enabled.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1395104 13f79535-47bb-0310-9956-ffa450edef68
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
* replaced non atomic containsKey+put+get with get + putIfAbsentAndGet
* replaced containsKey + null check + get with get + null check
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343692 13f79535-47bb-0310-9956-ffa450edef68
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)
Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
* captcha images created and then lost
* captcha images created in the wrong location (for example out of the OFBiz folder)
* the folder runtime/tempfiles/captcha could be locked
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335047 13f79535-47bb-0310-9956-ffa450edef68
it would call String.getBytes(), without specifying an encoding. That
meant that the platform default encoding would be used, which might
change between different installs(if someone changed an environment
variable, for instance). Now, there are explicit variants to be called.
When creating a new value, use cryptValueUTF8. If, for some reason,
calling code is doing it's own comparison, it must continue to use
cryptValueBytes(password.getBytes()).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334170 13f79535-47bb-0310-9956-ffa450edef68
go thru a deprecation cycle for this, as this method was only recently
added, and has never been officially released.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1333664 13f79535-47bb-0310-9956-ffa450edef68
This patch will enable NOT-IN operator to the performFind service.
Only two lines of the file framework/common/src/org/ofbiz/common/FindServices.java were modified to enable de NOT-IN operator.
An use case is provided to test
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328637 13f79535-47bb-0310-9956-ffa450edef68
A hideResultInLog service attribute is added. If set to true the service result will be hidden from possible exposition in ServiceDispatcher.runSync()
This is convenient when used for sending a password to an user (the password must be legible in the sent mail).
I'm sure a lot of you would want to have no logs at all in production. But by experience I know that we need to log info in logs even in production. Especially when the system is quickly moving ahead...
So this is a sure mean to hide any password in logs, being current or backuped somewhere on the servers disks...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328122 13f79535-47bb-0310-9956-ffa450edef68