[openstreetmap/openstreetmap-website] Allow `user/preferences/[KEY]` to accept arbitrary keys (PR #3787)

Andy Allan notifications at github.com
Thu Nov 17 17:39:40 UTC 2022


> Technically, yes. `%2E` is `.`. See [RFC3986](https://www.ietf.org/rfc/rfc3986.txt) section 2.1 for details (_all_ ASCII characters can be URL encoded, syntax is `%<char hex>`)

I was just reading section 2.3 "Unreserved Characters" and this concerns me:

> Characters that are allowed in a URI but do not have a reserved purpose are called unreserved.  These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde.

> URIs that differ in the replacement of an unreserved character with its corresponding percent-encoded US-ASCII octet are equivalent: they identify the same resource.

It then goes on to say:

> [they] should not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers. 

So that sounds like `gps.trace.visibility` and `gps%2Etrace%2Evisibility` will be treated as the same thing, and so we can't tell use the urlencode approach for these unreserved characters.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1318982892
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3787/c1318982892 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221117/9cb1481f/attachment.htm>


More information about the rails-dev mailing list