Subject: | Crypt::ECB doesn't handle certain data blocks correctly |
Crypt::ECB does not correctly handle data blocks that consist of a single '0'.
To reproduce the problem, encrypt the following data then decrypt the result.
Plain text: ILlW1nr30
Key: pb25YTt7d5b55711fd50bffcec4058d3e6c86bfc4c796bec2249b447
Padding: AUTO
Cipher: Blowfish (I don't think it matters though)
Fix:
Change line 277 from:
return '' unless $data;
to
return '' unless length($data) > 0;