File tree 2 files changed +4
-3
lines changed
datadog-instrumentations/src
dd-trace/src/appsec/iast/analyzers
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ function wrapQuery (query) {
30
30
const callbackResource = new AsyncResource ( 'bound-anonymous-fn' )
31
31
const asyncResource = new AsyncResource ( 'bound-anonymous-fn' )
32
32
const processId = this . processID
33
- let pgQuery = { }
34
- pgQuery . text = arguments [ 0 ]
33
+ let pgQuery = {
34
+ text : arguments [ 0 ]
35
+ }
35
36
36
37
return asyncResource . runInAsyncScope ( ( ) => {
37
38
startCh . publish ( {
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class SqlInjectionAnalyzer extends InjectionAnalyzer {
6
6
super ( 'SQL_INJECTION' )
7
7
this . addSub ( 'apm:mysql:query:start' , ( { sql } ) => this . analyze ( sql ) )
8
8
this . addSub ( 'apm:mysql2:query:start' , ( { sql } ) => this . analyze ( sql ) )
9
- this . addSub ( 'apm:pg:query:start' , ( { originalQuery } ) => this . analyze ( originalQuery ) )
9
+ this . addSub ( 'apm:pg:query:start' , ( { query } ) => this . analyze ( query . text ) )
10
10
}
11
11
}
12
12
You can’t perform that action at this time.
0 commit comments