Skip to content

Commit 5dd68b2

Browse files
committed
Fix some nil issues in SQLi test module
1 parent d47d1bc commit 5dd68b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/modules/auxiliary/test/sqli_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def initialize(info = {})
3636
end
3737

3838
def boolean_blind
39-
encoder = datastore['ENCODER'].empty? ? nil : datastore['ENCODER'].intern
39+
encoder = datastore['ENCODER']&.empty? ? nil : datastore['ENCODER'].intern
4040
sqli = create_sqli(dbms: @dbms, opts: {
4141
encoder: encoder,
4242
hex_encode_strings: datastore['HEX_ENCODE_STRINGS'],
@@ -57,7 +57,7 @@ def boolean_blind
5757
end
5858

5959
def reflected
60-
encoder = datastore['ENCODER'].empty? ? nil : datastore['ENCODER'].intern
60+
encoder = datastore['ENCODER']&.empty? ? nil : datastore['ENCODER'].intern
6161
truncation = datastore['TRUNCATION_LENGTH'] <= 0 ? nil : datastore['TRUNCATION_LENGTH']
6262
sqli = create_sqli(dbms: @dbms, opts: {
6363
encoder: encoder,
@@ -81,7 +81,7 @@ def reflected
8181
end
8282

8383
def time_blind
84-
encoder = datastore['ENCODER'].empty? ? nil : datastore['ENCODER'].intern
84+
encoder = datastore['ENCODER']&.empty? ? nil : datastore['ENCODER'].intern
8585
sqli = create_sqli(dbms: @dbms, opts: {
8686
encoder: encoder,
8787
hex_encode_strings: datastore['HEX_ENCODE_STRINGS'],

0 commit comments

Comments
 (0)