Skip to content

Commit

Permalink
Fix code scanning alert #1: Incomplete string escaping or encoding (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 75cf50b commit 84fa1ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dialect/mssql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class Mssql extends Dialect<{ questionMarkParameterPlaceholder?: boolean
createResult.push(`(${colNodes.map(this.visit.bind(this)).join(', ')})`);
this.visitingCreate = false;
let tableStr = tableResult.join(' ');
tableStr = tableStr.replace("'", "''");
tableStr = tableStr.replace(/'/g, "''");
tableStr = `'${tableStr.substring(1, tableStr.length - 1)}'`;
const whereClause = `WHERE TABLE_NAME = ${tableStr}`;
// TODO: need to add schema check, sudo code:
Expand Down

0 comments on commit 84fa1ec

Please sign in to comment.