Skip to content

Commit ed12c6a

Browse files
authored
sanitize just the stacktrace (#5)
1 parent b9c66cb commit ed12c6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ exports.wrapSequelize = (sequelize) => {
5050
// Allow only alphanumeric, periods, slashes, dashes, underscores,
5151
// spaces, newlines. The main concern is preventing injection of '*/
5252
// within the stacktrace.
53-
const commentStr = `stacktrace='${makeMinimalUsefulStacktrace()}'`.replace(/[^\w.:/\\\-\s\n]/g, '');
53+
const commentStr = `stacktrace='${makeMinimalUsefulStacktrace().replace(/[^\w.:/\\\-\s\n]/g, '')}'`;
5454

5555
if (commentStr && commentStr.length > 0)
5656
sql = `${sql} /*${commentStr}*/`;

0 commit comments

Comments
 (0)