File: 60_bts650454_send_galx_as_cookie.patch

package info (click to toggle)
checkgmail 1.13%2Bsvn43-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,564 kB
  • sloc: perl: 3,938; makefile: 14
file content (28 lines) | stat: -rw-r--r-- 1,146 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: pass GALX as cookie, to avoid continuos pop-up for auth
Author: Jan Jergus
Bug: http://sourceforge.net/tracker/?func=detail&aid=3406322&group_id=137480&atid=738663
Bug-Debian: http://bugs.debian.org/650454
Forwarded: not-needed

Index: checkgmail/checkgmail
===================================================================
--- checkgmail.orig/checkgmail	2012-01-08 18:14:20.369935655 +0100
+++ checkgmail/checkgmail	2012-01-08 18:16:16.170116161 +0100
@@ -891,7 +891,8 @@
 			print "Error: No GALX input field found\n";
 			return "Error: No GALX input field found";
 		}
-		$post_galx = URI_escape(URI_unescape($1));
+		my $galx = URI_unescape($1);
+		$post_galx = URI_escape($galx);
 		
 		# Find the data to post
 		my $post_data;
@@ -907,6 +908,7 @@
 		my $post_req = HTTP::Request->new('POST' => "https://www.google.com/accounts/ServiceLoginAuth?service=mail");
 		$post_req->content_type('application/x-www-form-urlencoded');
 		$post_req->content($post_data);
+		$post_req->header('Cookie' => "GALX=$galx");
 		my $post_response = $ua->request($post_req);
 		if ($post_response->is_error) {
 			my $code = $response->code;