Menu

#16 Some URLs result in a BYPASS loop

v2.9
open
nobody
None
5
2015-10-26
2006-09-18
No

This problem occurs in the current stable and beta
versions of Dansguardian.

I've enabled the BYPASS feature and it works well.
However, certain URLs seem to cause a infinite loop
of BYPASSes: The particular one I've found is the
ebay advanced search. I fI click on the advanced
search button immediately after entering EBAY. The
problem appears to be caused by the bypass hash being
generated from an escaped URL (the & is converted
into &amp); while the hash generated for comparison
the next time the page is visited isn't escaped.
Hence the two URL's are actually different and the
hashes don't match (see below):

FIRST (just before BYPASS page is displayed

Sep 15 16:38:31 apsu dansguardian: Generate hash
GBYPASS=271760007A26C351403FB3B6C6129F051158311310
from url
http://search.ebay.com.au/ws/search/AdvSearch?
sofindtype=13&ssPageName=h:h:advsearch:AU

SECOND (generating new hash to compare with the one
extracted from GBYPASS=)

Sep 15 16:38:32 apsu dansguardian: URL is
http://search.ebay.com.au/ws/search/AdvSearch?
sofindtype=13&ssPageName=h:h:advsearch:AU

AND The hashes don't match:

Sep 15 16:38:32 apsu dansguardian: URL GBYPASS hash
mismatch

I'm continuing to delve into the code to try to find
out why one is escaped and the other isn't.

Richard Eames

Discussion

  • Richard Eames

    Richard Eames - 2006-09-18

    Config files and template

     
  • Richard Eames

    Richard Eames - 2006-09-18

    Logged In: YES
    user_id=1600371

    I've added some code as a work around to HTMLTemplate.cpp in
    the BYPASS section just after

                else if (line == "-BYPASS-") {
                        if (hashed.length() > 0) {
                                line = *url;
    

    The code below is just a hack since there are other codes
    such as &amp etc:

                               while (line.contains("&")) {
                                  before = line.before("&");
                                  after = line.after("&");
                                  templine = before +
    

    "&";
    line = after;
    }
    if (
    strlen(templine.toCharArray()) ) {
    line = templine + after;
    }

     
  • James Jalbert

    James Jalbert - 2015-10-26

    Any word of a fix for this issue?

     

Log in to post a comment.

MongoDB Logo MongoDB