Skip to content

Commit e677e93

Browse files
Escaping unsafe characters in email, adding pnpm-lock
1 parent 2bc7f73 commit e677e93

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

components/stripe/actions/search-customers/search-customers.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@ export default {
6262
}
6363

6464
if (this.email) {
65-
queryParts.push(`email="${this.email}"`);
65+
// Escape quotes in the email value to prevent query syntax errors
66+
const escapedEmail = this.email.replace(/"/g, "\\\"");
67+
queryParts.push(`email="${escapedEmail}"`);
6668
}
6769

6870
if (this.emailDomain) {
69-
queryParts.push(`email~"${this.emailDomain}"`);
71+
// Escape quotes in the domain value to prevent query syntax errors
72+
const escapedDomain = this.emailDomain.replace(/"/g, "\\\"");
73+
queryParts.push(`email~"${escapedDomain}"`);
7074
}
7175

7276
const afterTimestamp = this.convertDateToTimestamp(this.createdAfter);

pnpm-lock.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)