ver_re fullmatch AssertionError on https://metasnap.debian.net/cgi-bin/api?archive=debian&pkg=fonts-opensymbol&arch=amd64&ver=4:102.12+LibO25.2.3-1
I was trying to access this:
I see how this is probably a "wrong URL", but I think it still shouldn't fail with an AssertionError and some HTML:
AssertionError Python 3.11.2: /usr/bin/python3
Fri May 30 14:13:55 2025
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/var/www/cgi-bin/api in <module>
309 assert arch_re.fullmatch(qdict["arch"])
310 if "ver" in qdict:
=> 311 assert ver_re.fullmatch(qdict["ver"])
312 if "suite" in qdict:
313 assert re.fullmatch(r"^[A-Za-z][a-z0-9.-]+$", qdict["suite"])
ver_re = re.compile('^[A-Za-z0-9.+~:-]+$'), ver_re.fullmatch = <built-in method fullmatch of re.Pattern object>, qdict = {'arch': 'amd64', 'archive': 'debian', 'pkg': 'fonts-opensymbol', 'ver': '4:102.12 LibO25.2.3-1'}
AssertionError:
add_note = <built-in method add_note of AssertionError object>
args = ()
with_traceback = <built-in method with_traceback of AssertionError object>
Note that the + in ver= got decoded as an empty space, which probably causes the failure here.