details: /erp/devel/pi/rev/87f91199fb30
changeset: 10830:87f91199fb30
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Tue Feb 22 16:59:44 2011 +0100
summary: Fixed bug 16024: Slow login
diffstat:
src-db/database/model/tables/AD_SESSION.xml | 3 +++
src/org/openbravo/base/secureApp/UserLock.java | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r 811e1c898389 -r 87f91199fb30 src-db/database/model/tables/AD_SESSION.xml
--- a/src-db/database/model/tables/AD_SESSION.xml Tue Feb 22 15:17:15
2011 +0100
+++ b/src-db/database/model/tables/AD_SESSION.xml Tue Feb 22 16:59:44
2011 +0100
@@ -75,6 +75,9 @@
<foreign-key foreignTable="AD_ORG" name="AD_SESSION_AD_ORG">
<reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
</foreign-key>
+ <index name="AD_SESSION_USER_IDX" unique="false">
+ <index-column name="USERNAME"/>
+ </index>
<check name="AD_SESSION_ACTIVE_CHK"><![CDATA[SESSION_ACTIVE IN ('Y',
'N')]]></check>
</table>
</database>
diff -r 811e1c898389 -r 87f91199fb30
src/org/openbravo/base/secureApp/UserLock.java
--- a/src/org/openbravo/base/secureApp/UserLock.java Tue Feb 22 15:17:15
2011 +0100
+++ b/src/org/openbravo/base/secureApp/UserLock.java Tue Feb 22 16:59:44
2011 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SL
- * All portions are Copyright (C) 2010 Openbravo SL
+ * All portions are Copyright (C) 2010-2011 Openbravo SL
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -101,6 +101,14 @@
this.userName = userName;
setUser();
+
+ if (delayInc == 0) {
+ // No need to check number of fails as login security is not enabled
+ delay = 0;
+ numberOfFails = 0;
+ return;
+ }
+
// Count how many times this user has failed without success
StringBuilder hql = new StringBuilder();
hql.append("select count(*)");
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits