mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
add tests for comment attacks
This commit is contained in:
parent
14860f6a8b
commit
ef8839aafa
@ -88,4 +88,8 @@ class TestSQLQuery(TestCase):
|
||||
|
||||
self.assertFalse(query.is_safe())
|
||||
|
||||
def test_marks_comment_attacks_as_not_safe(self):
|
||||
query = SQLQuery("SELECT * FROM users WHERE username='{{username}}' AND password='{{password}}'")
|
||||
query.apply({"username": "admin' --"})
|
||||
|
||||
self.assertFalse(query.is_safe())
|
||||
|
Loading…
Reference in New Issue
Block a user