Bug#516679: gophermap h links misinterpreted

2023-01-15 Thread Paul Wise
On Sun, 22 Feb 2009 16:44:25 -0800 carbonated beverage wrote:

> h links in the gophermap file works correctly at the top-level gophermap,
> but not in a subdirectory.

pygopherd 3.0.0~git20221126.02c65d60-3 has been reintroduced into
Debian unstable.

Please try it and see if the issue has been fixed.

If the issue has been fixed, please let us know on this bug.

If the issue has not been fixed, please search the upstream bug
databases to see if the issue is already reported and if it is not
reported, then report a new issue upstream. Please let us know about
any new or existing upstream bugs you file or find.

https://github.com/michael-lazar/pygopherd/issues

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#516679: gophermap h links misinterpreted

2009-08-18 Thread Jeroen Schot
I have investigated this. The problem is that pygopherd interprets the 'URL:'
path as a relative path as specified in [1]. The resulting path
('/ramone/URL:..') is not a valid URL path as in [2] because it does not start
with 'URL:' or '/URL'.  So it looks like pygopherd is doing the right thing.
But the bucktooth FAQ has another entry ([3]) that explicitly mentions the
usage of relative URL's in gophermaps.

For the submitter: A workaround is prepending a '/' to the path. This will
always work. And note that the usage of port 80 in your example is incorrect:
The host and port of a menu line should point to the local gopher server, not
the remote URL server, so that it can render a redirection document for old
clients.

For the maintainer: Attached patch fixes this bug by explicitly checking for
this case.

[1]: gopher://gopher.floodgap.com/0/buck/dbrowse%3Ffaquse%201
[2]: 
gopher://quux.org/0/Archives/Mailing%20Lists/gopher/gopher.2002-02?/MBOX-MESSAGE/34
[3]: gopher://gopher.floodgap.com/0/buck/dbrowse?faquse%205

Regards,
-- 
Jeroen Schot
diff -ru pygopherd-2.0.18.3.orig/pygopherd/handlers/gophermap.py pygopherd-2.0.18.3/pygopherd/handlers/gophermap.py
--- pygopherd-2.0.18.3.orig/pygopherd/handlers/gophermap.py	2008-03-02 22:51:01.0 +0100
+++ pygopherd-2.0.18.3/pygopherd/handlers/gophermap.py	2009-08-18 10:16:49.0 +0200
@@ -71,7 +71,7 @@
 args[1] = args[0][1:] # Copy display string to selector
 
 selector = args[1]
-if selector[0] != '/': # Relative link
+if not selector.startswith('URL:') and selector[0] != '/': # Relative link
 selector = selectorbase + '/' + selector
 
 entry = gopherentry.GopherEntry(selector, self.config)


signature.asc
Description: Digital signature


Bug#516679: gophermap h links misinterpreted

2009-02-22 Thread carbonated beverage
Package: pygopherd
Version: 2.0.17

h links in the gophermap file works correctly at the top-level gophermap,
but not in a subdirectory.  When using a gophermap at the subdirectory as
follows:

ramune/nietzsche:ramune: cat -A gophermap 
1Entries from 2009^I2009^Ipsychosnugglebunnies.net^I70$
hATOM 
feed^IURL:http://psychosnugglebunnies.net/~ramune/phlog/tubers.xml^Ipsychosnugglebunnies.net^I80$

This is the link the browsers get:

gopher://psychosnugglebunnies.net:80/h/ramune/URL:http://psychosnugglebunnies.net/~ramune/phlog/tubers.xml

Firefox with Overbite using view source:
a href = 
gopher://psychosnugglebunnies.net:80/h/ramune/URL:http://psychosnugglebunnies.net/~ramune/phlog/tubers.xml;

And the gopher client from Debian with '=':
Type=h
Name=ATOM feed
Path=/ramune/URL:http://psychosnugglebunnies.net/~ramune/phlog/tubers.xml
Host=psychosnugglebunnies.net
Port=80
URL:gopher://psychosnugglebunnies.net:80/h/ramune/URL%3ahttp%3a//psychosnuggleb
unnies.net/%7eramune/phlog/tubers.xml

Gophermap was removed from the system to prevent confusion for clients.
If the directory contents are needed for analysis, I'd be happy to provide
them.

System is Debian/etch on x86-64.

-- DN
Daniel



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org