Mukund Sivaraman writes:
> I'm testing public-inbox with a "test-list" to try to provide a HTTP
> interface to mailing list archives. I'm using stock
> public-inbox-1.7.0-2.fc35.noarch on Fedora 35.
>
> List emails are injected by public-inbox-mda. public-inbox-httpd
> displays an error at this URL:
>
> https://inbox.banu.com/test-list/Yo1VM9+M%252FsYJIZkN@d1/T/
What's the source of this URL? The slash looks percent-encoded one too
many times:
message ID: Yo1VM9+M/sYJIZkN@d1
| / -> %2F
V
percent-encoded once: Yo1VM9+M%2FsYJIZkN@d1
| % -> %25
V
percent-encoded twice: Yo1VM9+M%252FsYJIZkN@d1
> "Message-ID <Yo1VM9+M/sYJIZkN@d1/T> not found"
Hmm, I'm surprised by the trailing "/T". When I visit the above URL, I
see
Message-ID <Yo1VM9+M%2FsYJIZkN@d1>
not found
which is what I would expect.
> The ASCII encoded Message-ID is "Yo1VM9+M/sYJIZkN@d1" generated by the
> Mutt client.
>
> The corresponding message exists:
> https://inbox.banu.com/test-list/Yo1VM9+M%2FsYJIZkN@d1/
Yes, the looks to match the URL you'd get by percent-encoding the "/"
once (see above).
> Could someone please check what the bug could be?
>
> Does public-inbox-httpd have a problem with the '/' character in
> Message-IDs?
Here's what https://inbox.banu.com/test-list/_/text/help/ says about
slashes:
Forward slash ('/') characters in the Message-IDs
need to be escaped as "%2F" (without quotes).
And here's the escaping that public-inbox does on the message ID
(<https://public-inbox.org/public-inbox.git/tree/lib/PublicInbox/MID.pm?h=v1.8.0#n130>):
# RFC3986, section 3.3:
sub MID_ESC () { '^A-Za-z0-9\-\._~!\$\&\'\(\)\*\+,;=:@' }
sub mid_escape ($) { uri_escape_utf8($_[0], MID_ESC) }