miranj / craft-cryptographer

A Craft CMS plugin that adds Twig filters to encrypt and decrypt content via URL-safe strings.
https://plugins.craftcms.com/cryptographer
MIT License
13 stars 2 forks source link

openssl_decrypt error : “failed to base64 decode the input” #1

Closed chasegiunta closed 5 years ago

chasegiunta commented 8 years ago

openssl_decrypt error : “failed to base64 decode the input” I seem to get this error randomly, 1 out of 6 times or so, when trying to use the default decrypt & encrypt filters. Luckily, using AES-128-CFB for enc / dec has stopped the error.

rungta commented 8 years ago

I could be wrong, but this sounds like a URL encoding issue. Was the encrypted string (the output of encrypt) being passed on to decrypt via a URL at any point?

If yes, then can you try URL encoding the encrypted string using the url_encode Twig filter and see if the error persists?