Commit Graph
1143 Commits
Author SHA1 Message Date
Jacques Le Roux 7f246614fd Eclipse keeps telling me I should use HttpServletRequest and says "The method getContextPath() is undefined for the type ServletContext" despite https://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getContextPath%28%29
I tried to put a @SuppressWarnings("cast") which is also supported by Eclipse http://stackoverflow.com/questions/1205995/what-is-the-list-of-valid-suppresswarnings-warning-names-in-java
But no ways, I gave up and just put a comment there


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534591 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 10:23:26 +00:00
Adrian Crum af23fe0b35 Refactored ConfigXMLReader.java - added exception handling. The class swallowed exceptions like controller.xml file is missing or invalid - making debugging difficult. This commit introduces a WebAppConfigurationException and it propagates that exception farther up the stack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534517 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 06:50:05 +00:00
Adrian Crum 09bd8a1428 Reformatted ConfigXMLReader.java - no functional change. This is in preparation for some refactoring.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534488 13f79535-47bb-0310-9956-ffa450edef68
2013-10-22 04:17:55 +00:00
Jacques Le Roux 8b081856e2 Revert r1534276 commented with <<No functional change, fixes this message in Eclipse "The method getContextPath() is undefined for the type ServletContext" which does not prevent to compile though. Compiled with Oracle JVM 1.6.0.45">>
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
2013-10-21 22:48:29 +00:00
Jacques Le Roux 58e427adae No functional change, fixes this message in Eclipse "The method getContextPath() is undefined for the type ServletContext" which does not prevent to compile though. Compiled with Oracle JVM 1.6.0.45
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1534276 13f79535-47bb-0310-9956-ffa450edef68
2013-10-21 17:01:03 +00:00
Jacques Le Roux 3a116293a3 A slightly modified patch from Gareth Carter for "Fixes for some xml/groovy files" https://issues.apache.org/jira/browse/OFBIZ-5349
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
2013-10-15 14:51:57 +00:00
Jacques Le Roux c8ce55ecc9 A patch from Anahita Goljahani for Fixed mispelling of "occurred" https://issues.apache.org/jira/browse/OFBIZ-5342
jleroux: this includes a safe change in jquery.validate.js and jquery.validate.min.js

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530341 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 16:35:40 +00:00
Adam Heath 7b3d3f6be9 There are some controller.xml entries that have a name of "none"; those
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
2013-09-30 19:57:13 +00:00
Adrian Crum 58bdfa3254 Remove dependency of webapp component on geo-related entities. This will make it easier to exclude geo-related functionality in a framework-only installation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526298 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 20:51:33 +00:00
Jacques Le Roux 5c4bb0a2b4 Reverts r1518777
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1522675 13f79535-47bb-0310-9956-ffa450edef68
2013-09-12 17:36:45 +00:00
Adrian Crum ac4f89935d Trivial improvement to log message: Add a stack trace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1522006 13f79535-47bb-0310-9956-ffa450edef68
2013-09-11 19:39:34 +00:00
Jacques Le Roux d6eaefbeb6 This fixes "Net before overhead report generates an error" https://issues.apache.org/jira/browse/OFBIZ-5267
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
2013-08-29 19:37:44 +00:00
Jacques Le Roux 1956e731a3 No functional changes, only formatting.
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
2013-08-08 12:28:01 +00:00
Hans Bakker 7d904526a0 missing file related to r1506836
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1508362 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 09:45:18 +00:00
Hans Bakker d3248ec21b be able to set a font for pdf generation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506836 13f79535-47bb-0310-9956-ffa450edef68
2013-07-25 07:53:29 +00:00
Adam Heath 35f83deb96 FEATURE: Add extension points to the controller login workflow; this
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
2013-06-28 19:08:32 +00:00
Adam Heath 256a4af82b FEATURE: Allow for externalLoginKey parameter generation to be turned
off; the use for this feature will become apparent shortly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497891 13f79535-47bb-0310-9956-ffa450edef68
2013-06-28 19:08:24 +00:00
Jacques Le Roux 5bffbb20bf A fixing patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
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
2013-06-03 09:34:26 +00:00
Jacques Le Roux eb9f05e7aa Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
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
2013-05-23 07:55:14 +00:00
Adrian Crum e5099432a0 Fixed a bug in the performance metrics feature where the wrong request Map was being updated in some cases.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484145 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:46:01 +00:00
Adrian Crum 9bd42ec3a2 Reverted revision 1483822.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484134 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:12:50 +00:00
Jacques Le Roux 929a06dfd5 Improves the Metrics stats by adding a new column used only by requests. It's quite useful to measure the real (not smoothed) durations of events in notably *chained* requests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1483822 13f79535-47bb-0310-9956-ffa450edef68
2013-05-17 14:21:02 +00:00
Adam Heath 952e43cdb5 FEATURE: When calling services from an incoming http requests, allow for a different request and session attribute name to be specified.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482508 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:31 +00:00
Adam Heath ec142071b0 FEATURE: If the user gets forcibly logged out, store a message into the
request that mentions this; currently, nothing uses this, but that is
coming soon.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482132 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:20 +00:00
Adam Heath e787885bb6 FEATURE: Allow events to return "none"; they can already return null,
which stops processing.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482130 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:04 +00:00
Adam Heath da1f1f92e6 FEATURE: Allow first-visit and preprocessor events to run "none"; this
is the same as null, and will stop processing.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482129 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:55 +00:00
Adam Heath 2b25d70adf FEATURE: Split checkLogin, creating checkLogout, which is a helper
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
2013-05-13 22:30:47 +00:00
Adam Heath 2ebf5a22ed FEATURE: Make isUserLoggedIn(request), loginUserWithUserLoginId(request,
response, userLoginId) and hasBasePermission(userLogin, request) public,
instead of private/protected.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482127 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:40 +00:00
Jacques Le Roux 44b77bdd07 A patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
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
2013-04-20 09:00:44 +00:00
Jacques Le Roux 524aee52f9 A slightly modified patch from Sumit Pandit for "Enforce user to reset his password in a pre-defined regular interval of time." https://issues.apache.org/jira/browse/OFBIZ-5009
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
2013-04-06 04:54:14 +00:00
Adrian Crum ae07fca011 Fixed a bug in one of my recent commits:
https://issues.apache.org/jira/browse/OFBIZ-5140


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1449429 13f79535-47bb-0310-9956-ffa450edef68
2013-02-24 00:27:33 +00:00
Adrian Crum 3caa1e66d3 Small improvements to ApacheFopWorker: check for file/folder existence before applying settings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446940 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 20:43:38 +00:00
Adrian Crum 9b6b06c44a Reverting revision 1345849 because it is not thread-safe and it doesn't work.
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
2013-02-16 16:31:31 +00:00
Jacques Le Roux bb024a2951 Better simpler comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432858 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:59:05 +00:00
Jacques Le Roux 4f7d1dc425 No functional change, forgot this one
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432856 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:52:43 +00:00
Jacques Le Roux f1fd26862c https://issues.apache.org/jira/browse/OFBIZ-5109
"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
2013-01-13 08:46:35 +00:00
Jacques Le Roux b14d7c1ab9 Those are not needed and even counter productive now, see discussion on dev ML http://markmail.org/message/mqe6c6qm2rofa4gg
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426605 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:32:23 +00:00
Scott Gray 0af4184d61 Remove a bunch of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418650 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:01 +00:00
Scott Gray 5df3e3f70b Remove a bunch of unused imports, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418646 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:03:52 +00:00
Jacques Le Roux 6dc2929e10 A patch from Sergei Biletnikov "Remote services via XMLRpc ignore the locale which is passed as the service parameter, the default locale is used forever" https://issues.apache.org/jira/browse/OFBIZ-5083
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
2012-11-25 09:20:23 +00:00
Jacopo Cappellato 6565a78ee0 OFBIZ-5072 Committed slightly different version of the patch contributed by Rene Frauli: the delegator, dispatcher and security objects are required in the session in multitenant mode.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1411196 13f79535-47bb-0310-9956-ffa450edef68
2012-11-19 14:25:55 +00:00
Jacques Le Roux b46c7a2c06 A patch from Naofumi Fukue "Japanese patch" https://issues.apache.org/jira/browse/OFBIZ-5061
Got an issue merging GeoData_JP.xml with Subclipse, using Toirtoise solved it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1403746 13f79535-47bb-0310-9956-ffa450edef68
2012-10-30 15:48:42 +00:00
Scott Gray a2a2857bef Replace more misc. webSiteId retrievals with calls to WebSiteWorker.getWebSiteId(request). Deprecated CatalogWorker.getWebSiteId(request) and CatalogWorker.getWebSite(request).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400626 13f79535-47bb-0310-9956-ffa450edef68
2012-10-21 11:27:10 +00:00
Jacques Le Roux cc5ddd92da Remove trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1395035 13f79535-47bb-0310-9956-ffa450edef68
2012-10-06 12:53:28 +00:00
Jacques Le Roux ac9f940790 A modified patch from Jyoti Sharma https://issues.apache.org/jira/browse/OFBIZ-5043
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
2012-10-06 10:59:12 +00:00
Jacques Le Roux d652185fce Adds a new line
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1393369 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 09:26:15 +00:00
Jacques Le Roux 899598caba Moves throwRequestHandlerExceptionOnMissingLocalRequest from general.properties to requestHandler.properties
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1393367 13f79535-47bb-0310-9956-ffa450edef68
2012-10-03 09:25:19 +00:00
Sascha Rodekamp 959321e0f1 Bug Fix: No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628). Thanks Wojciech Szymanowski for the hint. This Patch fixes the problems with parameters from hidden fields sending with POST method and parameters sending during "request-redirect" response type
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1392766 13f79535-47bb-0310-9956-ffa450edef68
2012-10-02 07:22:05 +00:00
Jacques Le Roux ecfc317a79 Closes "ControlServlet - Exception thrown for requests not defined by controller.xml" https://issues.apache.org/jira/browse/OFBIZ-5037
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
2012-09-27 14:49:20 +00:00
Hans Bakker 3bca44db12 OFBiz 5018: LoginWorker does not check a base permission for the root mount point
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1378020 13f79535-47bb-0310-9956-ffa450edef68
2012-08-28 08:30:10 +00:00