Skip to content

Commit 9c4d96f

Browse files
committed
Fix: update tornado
1 parent fe20571 commit 9c4d96f

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

src/checker/taint/python/tornado-taint-checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const PythonTaintAbstractChecker = require('./python-taint-abstract-checker')
22
const Config = require('../../../config')
33
const completeEntryPoint = require('../common-kit/entry-points-util')
44
const { markTaintSource } = require('../common-kit/source-util')
5-
const { isTornadoCall, tornadoSourceAPIs, isRequestAttributeAccess, extractTornadoParams } = require('./tornado-util')
5+
const { isTornadoCall, tornadoSourceAPIs, isRequestAttributeAccess } = require('./tornado-util')
66
const { extractRelativePath } = require('../../../util/file-util')
77

88
// Metadata storage

src/checker/taint/python/tornado-util.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,3 @@ export function isTornadoCall(node: any, targetName: string): boolean {
6565
}
6666
return false
6767
}
68-
69-
/**
70-
* Extract parameter info from URL regex patterns
71-
* @param pattern
72-
*/
73-
export function extractTornadoParams(pattern: string): { named: string[]; positionalCount: number } {
74-
if (!pattern) return { named: [], positionalCount: 0 }
75-
const named = Array.from(pattern.matchAll(/\(\?P<(\w+)>/g)).map((m) => m[1])
76-
if (named.length > 0) return { named, positionalCount: 0 }
77-
const cleaned = pattern.replace(/\\\(|\\\)/g, '')
78-
const positionalCount = (cleaned.match(/\((?!\?)/g) || []).length
79-
return { named: [], positionalCount }
80-
}

0 commit comments

Comments
 (0)