Re: Google broke recently with 3.0.4 causing repush loop

James C <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <CACZ9Q6gUfbbYviLaiUbvf3pvit-8MKYGEztD9Eze9r7Oqaa=Lg@mail.gmail.com>
All of this is with the cookiesrc below, which lets google have
cookies on two domains.

If I:
- log out of google
-- it stalls on a meta refresh tag
- select home, which for me is https://mail.google.com/?ui=html
- provide a username and password
-- I am eventually shown my email messages
then the code below redirects:
- once during the logout
- twice before asking for a password
- eight (8) times before showing me my mail

Adding back the hack to share cookies probably makes no difference to
these figures, but I'm not sure, because I think that I remember
inconsistently getting seven and nine redirects, so I think that
google is A/B testing me.

This code cannot be put into production, because it produces messages
about redirecting 0 times reasonably often, for reasons that I haven't
tracked down yet.

--------------------------------
#host         action
DEFAULT DENY
.google.com	ACCEPT_SESSION
.google.co.nz	ACCEPT_SESSION
--------------------------------

render/dillo-jfw01$ hg diff
diff -r 07c0c28f8960 src/cache.c
--- a/src/cache.c	Fri Mar 06 13:12:11 2015 +1300
+++ b/src/cache.c	Sat May 09 22:03:31 2015 +1200
@@ -1007,11 +1007,24 @@
       return 0;
    }

-   /* if there's a redirect loop, stop now */
-   if (bw->redirect_level >= 5)
-      entry->Flags |= CA_RedirectLoop;
+//   if (0 == bw->redirect_level % 5) {
+   if (0 == bw->redirect_level % 1) {
+      char *redirMessage;
+      int choice;
+
+      asprintf(&redirMessage, "Dillo: redirected %d times",
bw->redirect_level);
+
+      choice = a_Dialog_choice(redirMessage, URL_STR(entry->Url),
+                               "Stop", "Continue", NULL);
+
+      if (1 == choice)
+         entry->Flags |= CA_RedirectLoop;
+
+      free(redirMessage);
+   }

    if (entry->Flags & CA_RedirectLoop) {
+      MSG("Redirect loop for: %s\n", URL_STR_(entry->Url));
       a_UIcmd_set_msg(bw, "ERROR: redirect loop for: %s",
URL_STR_(entry->Url));
       bw->redirect_level = 0;
       return 0;
diff -r 07c0c28f8960 src/cookies.c
--- a/src/cookies.c	Fri Mar 06 13:12:11 2015 +1300
+++ b/src/cookies.c	Sat May 09 22:03:31 2015 +1200
@@ -196,6 +196,15 @@

    if (requester == NULL) {
       /* request made by user */
+#if 0
+   } else if (!strcmp("accounts.google.co.nz", URL_HOST(requester)) &&
+              !strcmp("mail.google.com", URL_HOST(query_url))) {
+      MSG("Cookies: sent for google NZ special case 1.\n");
+   } else if (!strcmp("accounts.google.com", URL_HOST(requester)) &&
+              !strcmp("accounts.google.co.nz", URL_HOST(query_url))) {
+      MSG("Cookies: sent for google NZ special case 2.\n");
+
+#endif
    } else if (!a_Url_same_organization(query_url, requester)) {
       MSG("Cookies: not sent for request by '%s' for '%s'\n",
           URL_HOST(requester), URL_HOST(query_url));


On 09/05/2015, eocene <[email protected]> wrote:
> James wrote:
>> Here's a guess without justification: it's trying to get confirmation
>> that you accepted a cookie, and failing.
>
> I did make a quick attempt with accept_session in cookiesrc, and it
> didn't appear to make a difference...
>
>> The basis for my guess is that login to gmail is possible, but
>> requires more than five redirects, so I run a hacked up dillo 3.1,
>> with a dialog about whether to keep redirecting.
>
> How many redirects does it need? The only site that I tend to run into
> redirect problems with is nytimes.com (Not logging into any account;
> just looking at articles that people post links to...), and the last
> time I checked it was something like 12 redirects before it will give
> up and provide the page. And I wonder whether raising the redirect
> limit might be good, overall.
>
> Does gmail still need all of those redirects if you let it have a
> cookie?
>
> _______________________________________________
> Dillo-dev mailing list
> [email protected]
> http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.