Skip to content

backport.py: Only accept change numbers consisting of ASCII digits

Previously _change_number() used str.isnumeric(), but
isnumeric() accepts more than ASCII digits 0-9. Now we use a regular
expression explicitly using [0-9] (not \d, which also accepts
non-ASCII digits). This makes it easier to reason about what
acceptable input is.

Edited by Ahmon Dancy

Merge request reports