Revert "[fragments] Pad fragments before decrypting (#1298)"

This reverts commit 373475f035.
pull/1349/head
pukkandan 3 years ago
parent aa7785f860
commit 2cda6b401d
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -355,8 +355,7 @@ class FragmentFD(FileDownloader):
# not what it decrypts to.
if self.params.get('test', False):
return frag_content
padding_len = 16 - (len(frag_content) % 16)
decrypted_data = aes_cbc_decrypt_bytes(frag_content + bytes([padding_len] * padding_len), decrypt_info['KEY'], iv)
decrypted_data = aes_cbc_decrypt_bytes(frag_content, decrypt_info['KEY'], iv)
return decrypted_data[:-decrypted_data[-1]]
return decrypt_fragment

Loading…
Cancel
Save