- Mar 09, 2017
-
-
Lukas Braun authored
-
- Mar 07, 2017
-
-
Lukas Braun authored
In the process, make the database connection object global because we have to reconnect in order for the database settings to take effect and thus have to reassign the variable.
-
- Mar 06, 2017
-
-
Lukas Braun authored
The transaction_conflict test in its previous form would deadlock because PostgreSQL locks tables/rows instead of aborting on every conflict. The fix is to force a rollback by first reading and then updating in both transactions, which would result in a lost update otherwise.
-
- Mar 04, 2017
-
-
Lukas Braun authored
-
Lukas Braun authored
-
- Feb 28, 2017
-
-
Lukas Braun authored
Means we have to check if the user exists separately from checking the offer.
-
- Feb 27, 2017
-
-
Lukas Braun authored
Scanner aborts when lines are too long and is more flexible wrt. line separators.
-
- Feb 07, 2017
-
-
Lukas Braun authored
-
Lukas Braun authored
-
- Feb 02, 2017
-
-
Lukas Braun authored
Now we can use get_user/get_otp without having to open a transaction each time (which also fixes a leak of transactions if an error occurs).
-
Lukas Braun authored
-
- Feb 01, 2017
-
-
Lukas Braun authored
The Lookahead var should indicate how often the counter is incremented before an offer is finally declared invalid, *not* the total number of checks (aka window size). I.e. for Lookahead=0, check only against the current counter instead of not at all.
-
Lukas Braun authored
-
Lukas Braun authored
Because we don't want to keep the connection open while delaying for a failed login, return the lock from handle_conn if the unlock should be delayed. serve then closes the connection and sleeps before calling Unlock().
-
- Jan 31, 2017
-
-
Lukas Braun authored
-
Lukas Braun authored
- sqlite3.ErrNo is not an sqlite3.Error, we have to unpack it first - an interrupted transaction in an in-memory database (with shared cache) leads to ErrLocked, while in a regular file-backed databes an ErrBusy is returned
-
- Jan 30, 2017
-
-
Lukas Braun authored
For testing.
-
Lukas Braun authored
Not sure if Prepare can actuall fail because of a transaction conflict, but checking can't hurt.
-
Lukas Braun authored
-
- Jan 27, 2017
-
-
Lukas Braun authored
-
Lukas Braun authored
-
- Jan 23, 2017
-
-
Lukas Braun authored
-
Lukas Braun authored
-
- Jan 22, 2017
-
-
Lukas Braun authored
-
Lukas Braun authored
Faking ratelimiting for non-existent users would require keeping state for every requested user, effectively allocating an unbounded amount of memory. Enumerating users seems like the smaller problem, especially since the targeted environment has a semi-public list of users anyway.
-
Lukas Braun authored
-
Lukas Braun authored
Server mostly works, using SQLite.
-