fix_: loading hash_ratchet_encryption from database checks group_id
This commit is contained in:
parent
292070a854
commit
da12c52596
|
@ -764,7 +764,11 @@ func (s *sqlitePersistence) GetHashRatchetCache(ratchet *HashRatchetKeyCompatibi
|
|||
}
|
||||
}
|
||||
|
||||
err = tx.QueryRow("SELECT key FROM hash_ratchet_encryption WHERE key_id = ? OR deprecated_key_id = ?", keyID, ratchet.DeprecatedKeyID()).Scan(&key)
|
||||
err = tx.QueryRow("SELECT key FROM hash_ratchet_encryption WHERE key_id = ? OR (deprecated_key_id = ? AND group_id = ?)",
|
||||
keyID,
|
||||
ratchet.DeprecatedKeyID(),
|
||||
ratchet.GroupID,
|
||||
).Scan(&key)
|
||||
if err == sql.ErrNoRows {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue