0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-25 02:45:12 +00:00

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

This reverts commit 373475f035.
This commit is contained in:
pukkandan 2021-10-19 22:13:45 +05:30
parent aa7785f860
commit 2cda6b401d
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -355,8 +355,7 @@ def decrypt_fragment(fragment, frag_content):
# 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