[Fixed]-Different return when using base64.encodestring with database and session variable

1👍

One of the strings probably contains some trailing characters that print isn’t showing. If you use repr then you should be able to see what the difference is.

print(repr(key_session))
print(repr(key_db))

You can then strip any characters as necessary before encoding the string, for example:

key_session = key_session.rstrip('\x02')

Leave a comment