From: Eric Wong <e@80x24.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: meta@public-inbox.org
Subject: Re: Occasional web view corruption (extra html escapes)
Date: Wed, 4 Sep 2024 13:14:43 +0000 [thread overview]
Message-ID: <20240904131443.M476652@dcvr> (raw)
In-Reply-To: <20240903-woodoo-airborne-harrier-6733c5@meerkat>
Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> On Tue, Sep 03, 2024 at 07:11:51PM GMT, Eric Wong wrote:
> > Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> > > In the HTML source, I see:
> > >
> > > <a
> > > href="?t=20240829184845"></a>From<a
> >
> > By any chance, do you have empty `address =' entries in the
> > public-inbox config file?
>
> Doesn't appear to be the case. The config is:
>
> [include]
> path = /etc/public-inbox/config.include
> [publicinbox "tools"]
> address = tools@linux.kernel.org
> url = tools
> inboxdir = /srv/public-inbox/lore.kernel.org/tools
> indexlevel = basic
> newsgroup = org.kernel.linux.tools
> boost = 10
> listid = tools.linux.kernel.org
> (repeat for every list)
OK, and nothing malformed or commented out in the address=
fields? And no stray semi-colons or hash marks in any address
fields which comment out only the value?
Because having an empty address= and empty url= field in my
publicinbox.lkml section gives me something close (but not
exactly) to what you have:
<a
href="/?t=20240829184845"></a> &<a
href="/?t=20240829184845"></a>lt<a
href="/?t=20240829184845"></a>;<a
Note the href has a leading slash in my near-reproduction
but yours did not.
It's not a double-escaping problem, but the substituion is
is breaking already -escaped `<' and `>' apart with <a>
tags in between characters. but I'm not sure how this is
happening to you if all your address fields look OK.
I'll filter out blank addresses in our config reader, but
I also wonder if there's anything else going on...
And all your writes to the config are via git-config?
(or public-inbox-config) IOW, it's not possible for a
partially-written config file to be read because git-config
writes atomically via rename(2).
Fwiw, the buggy code would be in addr2urlmap called by
_msg_page_prepare in PublicInbox::View.
addr2urlmap() will escape any regexp metacharacters present in
addresses via quotemeta, so there's no chance of regexp
injection from a config.
(hopefully coherent, running on fumes due to real life things)
next prev parent reply other threads:[~2024-09-04 13:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 17:52 Occasional web view corruption (extra html escapes) Konstantin Ryabitsev
2024-09-03 18:42 ` Eric Wong
2024-09-03 19:18 ` Konstantin Ryabitsev
2024-09-03 19:11 ` Eric Wong
2024-09-03 19:22 ` Konstantin Ryabitsev
2024-09-04 13:14 ` Eric Wong [this message]
2024-09-04 14:42 ` Konstantin Ryabitsev
2024-09-06 22:20 ` Filip Hejsek
2024-09-06 22:42 ` Eric Wong
2024-09-06 23:29 ` Eric Wong
2024-09-07 1:24 ` Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240904131443.M476652@dcvr \
--to=e@80x24.org \
--cc=konstantin@linuxfoundation.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).