mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
bugfix: salt recheck will cause duplicated iv/salt error
This commit is contained in:
@@ -254,8 +254,9 @@ impl DecryptedReader {
|
||||
}
|
||||
|
||||
// Check repeated salt after first successful decryption #442
|
||||
if let Some(ref salt) = self.salt {
|
||||
context.check_nonce_replay(self.method, salt)?;
|
||||
if self.salt.is_some() {
|
||||
let salt = self.salt.take().unwrap();
|
||||
context.check_nonce_replay(self.method, &salt)?;
|
||||
}
|
||||
|
||||
// Remote TAG
|
||||
|
||||
Reference in New Issue
Block a user