Skip to content

Commit

Permalink
Use explicit base 10 for int()
Browse files Browse the repository at this point in the history
This does not change anything (barring vulnerabilities in Python's
regexp code), but it is useful to be explicit.
  • Loading branch information
DemiMarie committed Jun 28, 2022
1 parent ceeb8ab commit 4f1428f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splitgpg2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def sanitize_int(untrusted_arg: bytes, min_value: int, max_value: int) -> int:
raise Filtered # bad length
if not _int_re.match(untrusted_arg):
raise Filtered
res = int(untrusted_arg)
res = int(untrusted_arg, 10)
if not min_value <= res <= max_value:
raise Filtered
return res
Expand Down

0 comments on commit 4f1428f

Please sign in to comment.