Skip to content

Commit

Permalink
Allow True and False and add unit test to check regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Sep 16, 2024
1 parent 7417531 commit dd52948
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ def test_newline_and_indent_not_dangerous():
is_not_injection(" ")
is_not_injection(" ")
is_not_injection(" \r\n \n \n \t")


def test_booleans_and_numbers():
is_not_injection("True")
is_not_injection("False")
is_not_injection("0123456")
is_not_injection("01234567.18234")
is_not_injection("False True 012345.6789")
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
">>",
# Regarded as safe language tokens :
",",
"True",
"False",
]


Expand Down

0 comments on commit dd52948

Please sign in to comment.