Leseratte10 / acsm-calibre-plugin

Calibre plugin for ACSM->EPUB and ACSM->PDF conversion.
https://www.mobileread.com/forums/showthread.php?t=341975
GNU General Public License v3.0
593 stars 23 forks source link

Decode serial from bytes before concatenation in libadobe.py #66

Open johnboiles opened 9 months ago

johnboiles commented 9 months ago

Without this, on Python 3.9.7 and Python 3.10.12, running python3 register_ADE_account.py would result in this stacktrace:

Traceback (most recent call last):
  File "/root/register_ADE_account.py", line 78, in <module>
    main()
  File "/root/register_ADE_account.py", line 50, in main
    success = createDeviceFile(True, VAR_VER)
  File "/root/libadobeAccount.py", line 64, in createDeviceFile
    fingerprint = makeFingerprint(serial)
  File "/root/libadobe.py", line 249, in makeFingerprint
    str_to_hash = serial + devkey_bytes.decode('latin-1')
TypeError: can't concat str to bytes
Leseratte10 commented 9 months ago

Thanks for the PR. Though, I'm not quite sure why / if it is necessary. I've just spun up a Docker container with Python 3.10.12 and the script is running just fine as-is, without this change.

Did you test the latest release (0.0.16) or the most up-to-date version from Git (0.1.0-something)?