As reported by Adrian in dev ML this commit breaks the embedded Catalina startup.
java.lang.ClassCastException: org.apache.catalina.core.ApplicationContextFacade cannot be cast to javax.servlet.http.HttpServletRequest
Before Oracle JVM 1.6.0.45 you could not even compile, interesting... I wonder what will happen when we will jump in Java 8, which we will need to do a day or another anyway...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534404 13f79535-47bb-0310-9956-ffa450edef68
Validated all xml files and compiled all groovy files and found a few errors. Look at patch for details
jleroux: For webapptests.xml, I prefered to revert it from r959261 (I saw an issue in my xml editor, did not check more)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532366 13f79535-47bb-0310-9956-ffa450edef68
should be preferred as valid responses, instead of always assuming that
none means do nothing.
This fixes the issue reported in OFBIZ-5304.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527754 13f79535-47bb-0310-9956-ffa450edef68
This is related with r1361130, where the birt component was moved from framework to specialpurpose.
The fix is to create the possibility of a loose coupling from applications controllers to specialpurpose controllers. For that an if-present attribute is added to the include element. When used, if the included controller does not exist, instead of an error and a stack trace, a warning is thrown (only in English, for developers) suggesting to checkout the component from trunk. Indeed, in the current case, this situation should only arise in release after 12.04 where the birt component, like all others but the ecommerce component, had been removed. This can be used in other cases, but for now only the component level is covered.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1518777 13f79535-47bb-0310-9956-ffa450edef68
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
allows other components to automatically insert themselves, without
having to modify any existing files. This can be used for integrating
with Jasig CAS, or with OpenID.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497892 13f79535-47bb-0310-9956-ffa450edef68
This line should not have been changed, "requirePasswordChange" can come from UserLogin not only "request"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488938 13f79535-47bb-0310-9956-ffa450edef68
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68
method that returns a valid UserLogin entity, or null if permissions or
other reasons cause it to be invalid for the current scenario.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482128 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
It appears this was an attempt to create per-tenant FOP factories, but instead each tenant overwrites the previous FOP factory settings.
A proper implementation would require a FOP factory cache keyed by delegator name.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446913 13f79535-47bb-0310-9956-ffa450edef68
"Allow a whole controller or/and request/s to override a default 302 in case of redirect"
Since I did not get any feedbacks but Paul's, I decided to use 302 as default instead of 303.
The reason is like that nobody will be surprised. The same (bad for SEO) default than Java will be used.
Please test and review, and let's discuss it more if wanted...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432567 13f79535-47bb-0310-9956-ffa450edef68
This code replaces the possible locale from parameters by default locale.
// add the locale to the context
context.put("locale", Locale.getDefault());
The solution is simple: firstly check, if we have the locale as the parameter, if no, use the default locale.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1413307 13f79535-47bb-0310-9956-ffa450edef68
When i worked with Url Rewrite Filter, i faced the following issue:-
In case of http protocol in the url, https links on th epage were not being rewritten and when their was https url, http links were not rewritten.
The issue behind this what i found is that in RequestHandler.java encodeUrl() is not called in the above given case.
So, if we place response.encodeUrl() their the issue is resolved.
jleroux: This makes sense since we are still in the "if (encode) {" block. I just noticed that response != null was checked above so I placed the same check before encoding
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1394995 13f79535-47bb-0310-9956-ffa450edef68
This has been tested in a custom project and work as expected it does not add any functional features for OFBiz if you don't use external requests in controllers. So should have any impacts OOTB
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1391037 13f79535-47bb-0310-9956-ffa450edef68