Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/aikido/zen/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ module Zen
VERSION = "0.1.1"

# The version of libzen_internals that we build against.
LIBZEN_VERSION = "0.1.35"
LIBZEN_VERSION = "0.1.37"
end
end
18 changes: 10 additions & 8 deletions test/aikido/zen/scanners/sql_injection_scanner_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,6 @@ def refute_attack(query, input = query, *args)
b
c
INPUT

assert_attack <<~QUERY.chomp, <<~INPUT.chomp
SELECT * FROM users WHERE id = 'a'
OR 1=1#'
QUERY
a'
OR 1=1#
INPUT
end

test "handles multiline queries" do
Expand Down Expand Up @@ -339,6 +331,16 @@ def refute_attack(query, input = query, *args)
refute_attack "SELECT * FROM users WHERE id = 'SET CHARSET utf8'", "SET CHARSET utf8"
refute_attack "SELECT * FROM users WHERE id = 'SET CHARSET=utf8'", "SET CHARSET=utf8"
end

test "handles multiline inputs" do
assert_attack <<~QUERY.chomp, <<~INPUT.chomp
SELECT * FROM users WHERE id = 'a'
OR 1=1#'
QUERY
a'
OR 1=1#
INPUT
end
end

class TestPostgreSQLDialect < ActiveSupport::TestCase
Expand Down
Loading