Apparently there are some really screwed up In-Reply-To
fields out there.
my ($id, $force) = @_;
if ($force || $id =~ /[^\w\-]/ || length($id) > MID_MAX) {
+ utf8::encode($id);
return sha1_hex($id);
}
$id;
unless (defined $x38) {
# compatibility with old links (or short Message-IDs :)
- $mid = sha1_hex(mid_clean($mid));
+ $mid = mid_clean($mid);
+ utf8::encode($mid);
+ $mid = sha1_hex($mid);
($x2, $x38) = ($mid =~ /\A([a-f0-9]{2})([a-f0-9]{38})\z/);
}
"$x2/$x38";