[tech] Funny endless redirection

Stephane Bortzmeyer <stephane (a) sources.org>

Since we have no list tag for operational issues, I guess that [tech]
is OK.

The capsule gemini.marmaladefoo.com has a funny
redirection. <gemini://gemini.marmaladefoo.com/geminaut?name=gerald>
redirects to <gemini://gemini.marmaladefoo.com/geminaut?name=gerald/>
which redirects to
<gemini://gemini.marmaladefoo.com/geminaut?name=gerald//> and so on
until you run out of slashes :-)

May be it will reactivate the discussion on a way to get the contact
of a capsule, to report issues.

Link to individual message.

Luke Emmet <luke (a) marmaladefoo.com>



On 16-Jan-2021 09:58, Stephane Bortzmeyer wrote:
> The capsule gemini.marmaladefoo.com has a funny
> redirection. <gemini://gemini.marmaladefoo.com/geminaut?name=gerald>
> redirects to <gemini://gemini.marmaladefoo.com/geminaut?name=gerald/>
> which redirects to
> <gemini://gemini.marmaladefoo.com/geminaut?name=gerald//> and so on
> until you run out of slashes :-)

Hmm - there is something strange about that URL - it might be molly 
brown redirecting. I'll investigate.

But anyway, the URL is not a valid one - were you just playing around or 
did you follow a link from somewhere that linked to that URL?

There is a CGI demo here

gemini://gemini.marmaladefoo.com/cgi-bin/hello-world.cgi where you can 
put your name, e.g.

gemini://gemini.marmaladefoo.com/cgi-bin/hello-world.cgi?name=gerald

> May be it will reactivate the discussion on a way to get the contact
> of a capsule, to report issues.
There is an email address for yours truly on the root page of the capsule!

 ?- Luke

Link to individual message.

Luke Emmet <luke (a) marmaladefoo.com>



On 16-Jan-2021 10:51, Luke Emmet wrote:
>
> On 16-Jan-2021 09:58, Stephane Bortzmeyer wrote:
>> The capsule gemini.marmaladefoo.com has a funny
>> redirection. <gemini://gemini.marmaladefoo.com/geminaut?name=gerald>
>> redirects to <gemini://gemini.marmaladefoo.com/geminaut?name=gerald/>
>> which redirects to
>> <gemini://gemini.marmaladefoo.com/geminaut?name=gerald//> and so on
>> until you run out of slashes :-)
>
> Hmm - there is something strange about that URL - it might be molly 
> brown redirecting. I'll investigate.
>
Yes - it seems to be a molly brown bug.

If you take a valid URL that references a folder not having a trailing 
slash, and add a query to it, molly brown goes off on an endless redirect.

For example, try this one:

gemini://gemini.circumlunar.space/capcom?foo

1. Here the "capcom" folder exists with an index.gmi therein
2. Molly brown thereby puts a slash on the end of the URL, but what it 
should do is put a slash after the capcom maybe, thus

gemini://gemini.circumlunar.space/capcom/?foo

not

gemini://gemini.circumlunar.space/capcom?foo/

in this second case, molly brown will redirect again to


gemini://gemini.circumlunar.space/capcom?foo//

and so on.

I'll let solderpunk know.

In the mean time, I suggest not to construct strange parameterised URLs 
to folder URLs on molly brown!

 ?- Luke

Link to individual message.

Stephane Bortzmeyer <stephane (a) sources.org>

On Sat, Jan 16, 2021 at 10:51:54AM +0000,
 Luke Emmet <luke at marmaladefoo.com> wrote 
 a message of 28 lines which said:

> But anyway, the URL is not a valid one - were you just playing
> around or did you follow a link from somewhere that linked to that
> URL?

Following a link. (Unfortunately, Lupa does not register where did the
URL in its database comes from.)

Link to individual message.

Luke Emmet <luke (a) marmaladefoo.com>



On 16-Jan-2021 11:04, Stephane Bortzmeyer wrote
>> But anyway, the URL is not a valid one - were you just playing
>> around or did you follow a link from somewhere that linked to that
>> URL?
> Following a link. (Unfortunately, Lupa does not register where did the
> URL in its database comes from.)

For client authors, there is also the recommendation in the Gemini "best 
practices" doc to not automatically follow more than N (suggested N=5) 
redirects. This would prevent getting stuck in any intentional or 
inadvertent redirect tar pits that await.

I think there is are some intentional infinite redirect loops in the 
client torture tests as well as the usual inadvertent server or CGI bugs 
out in the geminiverse.

gemini://gemini.circumlunar.space/docs/best-practices.gmi

 ?- Luke

Link to individual message.

Stephane Bortzmeyer <stephane (a) sources.org>

On Sat, Jan 16, 2021 at 10:51:54AM +0000,
 Luke Emmet <luke at marmaladefoo.com> wrote 
 a message of 28 lines which said:

> > May be it will reactivate the discussion on a way to get the contact
> > of a capsule, to report issues.

> There is an email address for yours truly on the root page of the capsule!

It's also that your email server denylists mine:

<luke at marmaladefoo.com>: host mx2.mythic-beasts.com[2a00:1098:0:82:1000:0:2:1]
    said: 550 Block listed: https://www.spamhaus.org/sbl/query/SBLCSS (in reply
    to MAIL FROM command)

Link to individual message.

Stephane Bortzmeyer <stephane (a) sources.org>

On Sat, Jan 16, 2021 at 11:04:26AM +0000,
 Luke Emmet <luke at marmaladefoo.com> wrote 
 a message of 47 lines which said:

> Yes - it seems to be a molly brown bug.

A side effect of crawlers is that they exercice a lot of code and find
many bugs that would not have been detected by normal use :-)

Link to individual message.

---

Previous Thread: [ANN] Personal gemini capsule (brasilian portuguese)

Next Thread: [ANN] E-Fluo: Esperanto language aggregator