Skip to content
Snippets Groups Projects
  1. Aug 10, 2012
    • Brian Warner's avatar
    • Brian Warner's avatar
      add checkExpiredSession check, set session.superSessionToken, add DB methods · 1b0444d8
      Brian Warner authored
      With this change, existing session cookies are invalidated when the user
      changes their password. This will also support a "log me out of
      everywhere" button, which merely needs to update the superSessionToken
      as if the password was changed.
      
      This adds .superSessionToken to all sessions in
      wsapi.authenticateSession, and checks it against the database row in
      during a new checkExpiredSession() call (run for all /wsapi requests,
      both GETs and POSTs).
      
      All database methods which create an account or modify the password were
      changed to also set .superSessionToken (to the current time).
      updatePassword() added an 'invalidateSessions' argument so passwords can
      be rehashed (when the bcrypt work factor changes) *without* invalidating
      sessions. Finally, the database added a new method named
      superSessionToken() to retrieve the current value, for comparison in
      checkExpiredSession().
      
      wsapi/update_password.js is changed to add a call to authenticateSession
      after changing the password, to update the cookie with the new
      .superSessionToken. This ensures that the user's new session works on
      the next call after update_password.
      
      Database rows that don't have a superSessionToken (created before the
      code was upgraded to include this change) will not enforce
      session-checking, so user sessions will not be spontaneously expired
      when the server is upgraded past this revision.
      1b0444d8
  2. Jul 10, 2012
  3. Jul 04, 2012
  4. May 02, 2012
  5. Feb 27, 2012
    • Lloyd Hilaiel's avatar
      Handle slow queries, query retry, and database connection issues: · ef441617
      Lloyd Hilaiel authored
        * all database functions return an err as the first param which is non-null for failure.
        * all wsapis handle database errors and return service unavailable to client.
        * stalled-mysql-test implements unit tests to verify proper failure behavior of all wsapis.
        * configuration parameter added to define max allowed time per query
      ef441617
  6. Jan 17, 2012
  7. Jan 04, 2012
  8. Jan 03, 2012
    • Lloyd Hilaiel's avatar
      email_for_token now returns whether the user must set a password to finish... · 37639bc8
      Lloyd Hilaiel authored
      email_for_token now returns whether the user must set a password to finish adding an email to their browserid account.  also write (failing) tests for imminent changes to complete_email_addition api.  also refactor db layer, adding haveVerificationToken to move code off of emailForVerificationToken that only cares about whether a verification token exists or not.  whew.
      37639bc8
  9. Dec 28, 2011
  10. Dec 21, 2011
  11. Dec 15, 2011
  12. Nov 29, 2011
  13. Nov 23, 2011
  14. Nov 16, 2011
    • Lloyd Hilaiel's avatar
      move generation of ephemeral database names (used in perf/unit testing) to a... · 601bed72
      Lloyd Hilaiel authored
      move generation of ephemeral database names (used in perf/unit testing) to a higher level and out of core code.  also, emphemeral database cleanup is now a responsibility of the harness running the software (test harness, or run_locally.js).  This fixes race conditions in unit tests that restart daemons (closes #557) and simplifies running local performance tests (issue #504)
      601bed72
  15. Nov 15, 2011
  16. Nov 10, 2011
  17. Oct 28, 2011
  18. Oct 11, 2011
  19. Sep 23, 2011
  20. Sep 26, 2011
  21. Sep 15, 2011
  22. Sep 08, 2011
  23. Aug 23, 2011
  24. Aug 17, 2011
  25. Aug 09, 2011
  26. Aug 05, 2011
  27. Jul 22, 2011
  28. Jul 20, 2011
Loading