Subject: | EZCommand auth string is not escaped |
Currently Mail::Postini makes no attempt to URI-escape the generated
auth string for the EZCommand interface. Occassionaly URI-unfriendly
characters like '+' are produced when the string is base64-encoded.
Requests made with such auth strings typically return the error:
0 String authentication failed
The trivial patch attached deals with this by escape the auth string
when it is generated.
Cheers,
Rob.
Subject: | encode-auth-string.patch |
diff --git a/lib/Mail/Postini.pm b/lib/Mail/Postini.pm
index 6e5c3aa..1d22199 100644
--- a/lib/Mail/Postini.pm
+++ b/lib/Mail/Postini.pm
@@ -809,7 +809,7 @@ sub _do_command {
my $radd = chr(rand(26) + 0x41) . chr(rand(26) + 0x41) .
chr(rand(26) + 0x41) . chr(rand(26) + 0x41) . $username{$self};
- my $sig = sha1_base64( $radd . $secret{$self} ) . $radd;
+ my $sig = uri_escape(sha1_base64( $radd . $secret{$self} ) . $radd);
$addr = uri_escape($addr);