Skip Menu |

This queue is for tickets about the Mail-Webmail-Gmail CPAN distribution.

Report information
The Basics
Id: 14540
Status: resolved
Priority: 0/
Queue: Mail-Webmail-Gmail

People
Owner: mincus [...] cpan.org
Requestors: shlomif [...] iglu.org.il
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.04
Fixed in: (no value)



Subject: 1.04's login is now broken. (due to Gmail changes?)
It seems that the Gmail changes have broken Mail::Webmail::Gmail. An analysis shows it fails on the conditional: if ( $res->content() =~ /top.location = "(.*?)";/ ) { $req = HTTP::Request->new( GET => "https://www.google.com/accounts/$1" ); $req->header( 'Cookie' => $self->{_cookie} ); But I don't know exactly how to fix it from there.
From: mlopyrev [...] rogers.com
[SHLOMIF - Sat Sep 10 05:33:41 2005]: Show quoted text
> It seems that the Gmail changes have broken Mail::Webmail::Gmail. An > analysis shows it fails on the conditional: > > if ( $res->content() =~ /top.location = "(.*?)";/ ) { > $req = HTTP::Request->new( GET => > "https://www.google.com/accounts/$1" ); > $req->header( 'Cookie' => $self->{_cookie} ); > > But I don't know exactly how to fix it from there.
Yep. Google has changed login semantics a bit. My picture gallery is broken now :(.
From: mlopyrev [...] rogers.com
[guest - Tue Sep 13 21:09:36 2005]: Show quoted text
> [SHLOMIF - Sat Sep 10 05:33:41 2005]: >
> > It seems that the Gmail changes have broken Mail::Webmail::Gmail. An > > analysis shows it fails on the conditional: > > > > if ( $res->content() =~ /top.location = "(.*?)";/ ) { > > $req = HTTP::Request->new( GET => > > "https://www.google.com/accounts/$1" ); > > $req->header( 'Cookie' => $self->{_cookie} ); > > > > But I don't know exactly how to fix it from there.
> > > Yep. Google has changed login semantics a bit. My picture gallery is > broken now :(.
To hack around, in your LWP/UserAgent.pm, replace: $referral->remove_header(’Host’), ‘Cookie’); by $referral->remove_header(’Host’);
From: ads [...] bubba.org
[guest - Sun Oct 2 20:27:18 2005]: Show quoted text
> [guest - Tue Sep 13 21:09:36 2005]: >
> > [SHLOMIF - Sat Sep 10 05:33:41 2005]: > >
> > > It seems that the Gmail changes have broken Mail::Webmail::Gmail.
> An
> > > analysis shows it fails on the conditional: > > > > > > if ( $res->content() =~ /top.location = "(.*?)";/ ) { > > > $req = HTTP::Request->new( GET => > > > "https://www.google.com/accounts/$1" ); > > > $req->header( 'Cookie' => $self->{_cookie} ); > > > > > > But I don't know exactly how to fix it from there.
> > > > > > Yep. Google has changed login semantics a bit. My picture gallery is > > broken now :(.
> > > > > To hack around, in your LWP/UserAgent.pm, replace: > > $referral->remove_header(’Host’), ‘Cookie’); > by > $referral->remove_header(’Host’);
This does fix one issue, but login to gmail via this module is still broken at least as of 12/23/05.
From: Shlomi Fish
[SHLOMIF - Sat Sep 10 05:33:41 2005]: Show quoted text
> It seems that the Gmail changes have broken Mail::Webmail::Gmail. An > analysis shows it fails on the conditional: > > if ( $res->content() =~ /top.location = "(.*?)";/ ) { > $req = HTTP::Request->new( GET => > "https://www.google.com/accounts/$1" ); > $req->header( 'Cookie' => $self->{_cookie} ); > > But I don't know exactly how to fix it from there.
Attached is a diff against the module that fixes this problem for something I tried. The diff still has some issues. Among else, I modified the delete_messages function to section the messages into groups of 200 and delete them group by group. This may have only been necessary due to my ISP's mis-behaviour, and generally should work. I've also refactored the code a bit. I'd like to thank: 1. The commentator on this bug for the LWP::UserAgent patchlet (that was implemented as an LWP::UserAgent sub-class here.) 2. The hackers of the libgmail python interface whose code I used to remedy the login here. Regards, Shlomi Fish

Message body is not shown because it is too large.

This should be fixed in the new version 1.04.1 that I have just uploaded to CPAN - it may take a few hours to distribute... but you've waited two months, whats a few more hours ;). Special thanks to Sholmi for the patch contribution!