1
Mircryption / Re: A Couple Blowssi Suggestions
« on: May 19, 2014, 09:26 AM »
Also, just ran into a minor bug that crashes blowssi. I set a cbc channel key for my channel, and when I gave the key to a friend of mine, he forgot to set it to cbc, and defaulted it to ecb. So, when he sent a short test message "test" to the channel, it crashed my blowssi script.
This comes from an issue with the cbc handling portion of decrypt_msg. When you strip the +OK and the extra character for the *, then decode the base64 message, it leaves you with less than 8 bytes when you grab the randomiv portion of the message. I solved this with a simple length check on $randomiv.
This comes from an issue with the cbc handling portion of decrypt_msg. When you strip the +OK and the extra character for the *, then decode the base64 message, it leaves you with less than 8 bytes when you grab the randomiv portion of the message. I solved this with a simple length check on $randomiv.
Code: Perl [Select]
- sub decrypt_msg {
- my ($key, $message) = @_;
- # Added to allow for returning the unmodified message, since it would otherwise have the +OK... stripped from it before entering the cbc section
- my $orig_message = $message;
- ...