Skip to content

Commit

Permalink
Merge pull request #51 from AikidoSec/add-test
Browse files Browse the repository at this point in the history
Add test for dollar quoted string
  • Loading branch information
willem-delbare authored Jan 13, 2025
2 parents 2d64584 + 1d19290 commit e15135d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sql_injection/detect_sql_injection_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,4 +709,13 @@ mod tests {
);
is_injection!("SELECT * FROM users WHERE id IN (-1,571,639)", "-1,571,639");
}

#[test]
fn test_dollar_quoted_string() {
is_injection!(
"insert into cats_2 (petname) values ('foo'||$t$a$$t$||version()||'');",
"foo'||$t$a$$t$||version()||'",
dialect("postgresql")
);
}
}

0 comments on commit e15135d

Please sign in to comment.