Changeset 6688


Ignore:
Timestamp:
Jan 21, 2015, 8:18:30 AM (8 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1909: Add short delay in login method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/SessionControl.java

    r6685 r6688  
    378378    try
    379379    {
     380      Thread.sleep(500); // To prevent DOS/brute-force attacks
    380381      session = HibernateUtil.newSession();
    381382      tx = HibernateUtil.newTransaction(session);
     
    394395      currentContexts.clear();
    395396      loginInfo = li;
     397    }
     398    catch (InterruptedException ex)
     399    {
     400      throw new LoginException("Login aborted");
    396401    }
    397402    catch (BaseException ex)
Note: See TracChangeset for help on using the changeset viewer.