@patchstack/connect 0.5.16 → 0.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/protect.cjs CHANGED
@@ -6460,7 +6460,10 @@ var DEFAULT_RESPONSE_RULES = [
6460
6460
  // the constraint name, the column and the offending value discloses the schema anyway.
6461
6461
  action: "block",
6462
6462
  prefilter: ["SQLSTATE", "Sequelize", "ER_", "ORA-", "PG::", "SQLITE_ERROR", "SQL syntax"],
6463
- rule_v2: [{ parameter: "response.body", match: { type: "regex", value: "/(SQLSTATE\\[[0-9A-Z]+\\]|SequelizeDatabaseError|ER_[A-Z_]+|ORA-\\d{5}|PG::[A-Za-z]+Error|SQLITE_ERROR|You have an error in your SQL syntax)/i" } }]
6463
+ // Case-sensitive, because every signature is emitted in one fixed case. `ER_` is the one that needs
6464
+ // it: MySQL error codes are whole upper-case words (`ER_DUP_ENTRY`), and matched without case or a
6465
+ // word boundary it finds the end of ordinary identifiers such as a `cover__background` class name.
6466
+ rule_v2: [{ parameter: "response.body", match: { type: "regex", value: "/(SQLSTATE\\[[0-9A-Z]+\\]|SequelizeDatabaseError|\\bER_[A-Z][A-Z0-9_]*|ORA-\\d{5}|PG::[A-Za-z]+Error|SQLITE_ERROR|You have an error in your SQL syntax)/" } }]
6464
6467
  },
6465
6468
  {
6466
6469
  id: "resp-exception-trace",