[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#44811: marked as done (search_packages.pl creates bogus links)

Your message dated Sat, 11 Sep 1999 23:05:19 -0400
with message-id <19990911230519.A18549@debian.org>
and subject line Bug#44811: search_packages.pl creates bogus links
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Ian Jackson
(administrator, Debian bugs database)

Received: (at submit) by bugs.debian.org; 10 Sep 1999 19:14:32 +0000
Received: (qmail 24448 invoked from network); 10 Sep 1999 19:04:50 -0000
Received: from pop3-3.enteract.com (
  by master.debian.org with SMTP; 10 Sep 1999 19:04:50 -0000
Received: (qmail 81857 invoked from network); 10 Sep 1999 19:04:29 -0000
Received: from shell-3.enteract.com (kweide@
  by pop3-3.enteract.com with SMTP; 10 Sep 1999 19:04:29 -0000
Date: Fri, 10 Sep 1999 14:04:29 -0500 (CDT)
From: Klaus Weide <kweide@enteract.com>
Reply-To: Klaus Weide <kweide@enteract.com>
To: submit@bugs.debian.org
Subject: search_packages.pl creates bogus links
Message-ID: <Pine.NEB.3.96.990910091852.83629E-100000@shell-1.enteract.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Package: www.debian.org
Version: N/A

Apparently the script invoked by (for example)


uses the Referer HTTP header, if it is being sent, to construct
the links in the returned page.  I assume this is meant to point
the reader back at the right Web page mirror, like www.us.debian.org,
www.de.debian.org, etc.  But Referer-based navigation is fundamentally

For demonstration, I created a local file ~/lynx_bookmarks-copy.html,
(I) with a link to the above URL.  Following this link using lynx [*]
results in what looks at first like the usual Search Results page, but
with all the links wrong.  For example, what should have been a link to


is instead a link to


(II) By using a link to <http://packages.debian.org/lynx/> instead,
which redirects to the long URL above, I get the same result as above.

(III) In some situations lynx can send a completely unreleted Referer,
when returning with Left Arrow to a document that has dropped out of
its cache of rendered documents.

Relying on Referer for correct links is a Bad Idea in general.
You should at least check the header value for plausibility.
It probably should match "http://*.debian.org/* or something like
that.  If the string doesn't look right, do the same thing you do
when Referer is absent.

Or you could somehow pass through the hostname as part of
the URL query string, at least in some situations.

[*] III can be argued to be misbehavior on lynx's part.  I believe it
is acting correctly for I and II.
Note I had to put the links into a file not recognized as a bookmark
file, and make sure the -nofilereferer option (or its lynx.cfg
equivalent) is not set, for lynx to send Referer.  This is not material
to the point, no such steps would be necessary to demonstrate the
problem if I chose to access the file via an http (or ftp,...) URL.


Reply to: