svn commit: r1714244 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1714244 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

jleroux@apache.org
Author: jleroux
Date: Fri Nov 13 17:38:07 2015
New Revision: 1714244

URL: http://svn.apache.org/viewvc?rev=1714244&view=rev
Log:
A patch from Forrest Rae for "org.ofbiz.common.login.LoginServices.userLogin causes stack track when username or password is incorrect" https://issues.apache.org/jira/browse/OFBIZ-6721

org.ofbiz.common.login.LoginServices.userLogin is returning ERROR when a username or password is incorrect. It should return FAILURE instead of error. The error causes stack track to be printed to the log. The stack trace makes watching the log for actual errors difficult. This is especially hard when running and analyzing the log after a full test run, of in my case, a custom set of test cases.

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1714244&r1=1714243&r2=1714244&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Fri Nov 13 17:38:07 2015
@@ -416,7 +416,7 @@ public class LoginServices {
         }
 
         if (errMsg.length() > 0) {
-            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
+            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_FAIL);
             result.put(ModelService.ERROR_MESSAGE, errMsg);
         }
         return result;