On Wed, Dec 2, 2026 at 6:57 PM Roy T. Fielding <[email protected]> wrote:
>
> > On Nov 30, 2026, at 7:13 AM, Eric Covener <[email protected]> wrote:
> >
> > While requests with URL-encoded nulls, CR, and LF's are valid and the
> > encoded octets may actually be non-UTF8 multi-byte characters, I would
> > like to propose we no longer accept them by default.
> >
> > Most folks are familiar with AllowEncodedSlashes which has specific
> > behavior for %2F (off, on, NoDecode). I think for re-enabling stuff
> > like NULL/CR/LF I would want to force people to opt in via something
> > like a regex (too early to use normal config sections) and document
> > that it requires great care if the URL is further manipulated. I
> > think these would implicitly be NoDecode equivalent only.
> >
> > Anyone opposed in concept or have other ideas about the externals?
>
> I am generally opposed to this by default, though I wouldn't veto it.
>
> Origin server config is not where application choices should be restricted.
> There are a lot of applications that depend on sending raw data, including
> multi-line text input, within parts of a URL, and there is absolutely nothing
> wrong with that when properly encoded. We would be limiting our ability to
> serve legitimate traffic just because the more complex parts of our config
> are too stupid to properly handle them without decoding.
>
> OTOH, I would not be opposed to such a default check being placed in front
> of modules that are stupidly decoding the URL before processing, such as
> at the beginning of mod_rewrite, mod_jk, or mod_proxy. IOW, places that are
> more at risk of decoding mistakes and less likely to be correctly configured.
+1, things like REST/OpenAPI encode all sorts of things in the uri-path.
For (one of) the reverse proxy case there is ProxyPass'
mapping=encoded which preserves the encoding end-to-end. I think
%-encoded controls shouldn't be refused there, like
ap_unescape_url_ex() doesn't touch it already (pre_trans hook returns
DONE from the start). But it means that mappings (<Location>, <Proxy>,
...) have to use the encoded form and it's not like things are usually
configured.
Maybe we need an API to get/set the uri[-path] (i.e.
r->{parsed_,unparsed_,}uri, or a new field/type with lengths, non-\0
dependant), used everywhere, which would maintain both encoded and
decoded forms in sync (e.g. lazily) and could tell if it contains
controls or whatever. core/modules could use any form per their needs,
mappings use a normalized form, no double encoding/decoding with each
module's nocanon rule. mod_proxy would consume its encoded form,
mod_rewrite would consume/produce it, etc...
Regards;
Yann.