File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class Db2Detector(RegexBasedDetector):
61
61
# catch any character except newline and quotations, we exclude these
62
62
# because the regex will erronously match them when present at the end of the password
63
63
# db2 password requirements vary by version so we cast a broad net
64
- password = r'([^\n"\']+)'
64
+ password = r'([^\r\ n"\']+)'
65
65
denylist = (
66
66
re .compile (
67
67
r'{begin}{opt_quote}{opt_db}{opt_dash_undrscr}{password_keyword}{opt_quote}{opt_space}'
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class TestGheDetector(object):
46
46
(':anothersyntax!' , 'pwd::anothersyntax!' , True ),
47
47
('@#!%#' , 'DB2_PASSWORD = "@#!%#"' , True ),
48
48
('pass' , 'dashdb-password = "pass"' , True ),
49
+ ('pass' , 'dashdb-password = pass\r ' , True ),
49
50
('' , 'dashdb_host = notapassword' , False ),
50
51
('' , 'someotherpassword = "doesnt start right"' , False ),
51
52
],
You can’t perform that action at this time.
0 commit comments