mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Storing a new secret can cause more than one old secret to expire.
This depends on the (unspecified) order in which new secrets are stored. For example, if the secrets for periods 0 - 2 are loaded in period 3, the secrets for periods 3 and 4 will be stored; the secrets for periods 0 and 1 may expire separately if the secret for period 3 is stored before the secret for period 4, or together if the secret for period 4 is stored before the secret for period 3.
This commit is contained in:
@@ -879,9 +879,6 @@ abstract class JdbcDatabase implements Database<Connection> {
|
||||
batchAffected = ps.executeBatch();
|
||||
if(batchAffected.length != secrets.size())
|
||||
throw new DbStateException();
|
||||
for(int i = 0; i < batchAffected.length; i++) {
|
||||
if(batchAffected[i] > 1) throw new DbStateException();
|
||||
}
|
||||
ps.close();
|
||||
} catch(SQLException e) {
|
||||
tryToClose(ps);
|
||||
|
||||
Reference in New Issue
Block a user