Bad characters in self_link should be url encoded
As a part of two issues mentioned below, I realized that it is possible to generate bad URLs using characters that are valid for their object type but not for URLs.
An example is ?
character, which is valid for an email address (and possibly, a list's local part), or weird characters in regular expressions (bans/<email/regex>
resources) etc.
It is impossible for requests
or any other HTTP library to encode these characters in the URL because they don't have complete context of how the URL was generated. For example /members/random?@example.com
is technically a valid email, but when used in a URL the last @example.com
part will be treated as a separate query string parameter.
This could happen with fqdn_listname as well, but it looks like we don't allow ?
as characters in local part of mailing lists.