When receiving an empty string, aes_decrypt produces the following warning.

warning: mdecrypt_generic() [function.mdecrypt-generic]: An empty string was passed in .../sites/all/modules/contrib/aes/aes.module on line 762.

Using isset() instead of empty() on line 696 of aes.module fixes the issue.

Comments

StatusFileSize
new516 bytes

Patch supplied.

OK this is still an issue but my fix is completely wrong.

StatusFileSize
new703 bytes

Actual issue was being caused by $string = base64_decode($string); being called after the test for "empty" instead of before. Patch supplied.

I'll leave it to lee20 to apply the patch, but I just want to say nice catch and thanks for looking into this! It's been a standing issue for some time

No worries. Thanks for the handy module!

Status:Active» Needs review

Whoops forgot to change status.

Issue tags:+7.x-1.6

Are you sure this is the correct fix? Seems counter-intuitive not to check first.

Also, tracking for 7.x.

Version:6.x-1.4» 7.x-1.x-dev
Issue summary:View changes
Issue tags:-7.x-1.6

If someone interested in having this fixed - please do code review.