starknet 10.7.5 → 10.7.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [10.7.6](https://github.com/starknet-io/starknet.js/compare/v10.7.5...v10.7.6) (2026-09-09)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **logger:** coerce message to string before sanitizing CR/LF ([f0a3058](https://github.com/starknet-io/starknet.js/commit/f0a305811a009b3265185f9b5e0ca48301937ec8))
6
+ - **security:** harden code scanning findings ([63bf7bc](https://github.com/starknet-io/starknet.js/commit/63bf7bc3ac0bcbd3fd04769446f697983ac5b26c))
7
+
1
8
  ## [10.7.5](https://github.com/starknet-io/starknet.js/compare/v10.7.4...v10.7.5) (2026-09-08)
2
9
 
3
10
  ### Bug Fixes
@@ -1455,14 +1455,16 @@ var starknet = (() => {
1455
1455
  }
1456
1456
  formatMessage(logMessage) {
1457
1457
  const { level, message, timestamp, data } = logMessage;
1458
- let formattedMessage = `[${timestamp}] ${level}: ${message}`;
1458
+ const sanitizedMessage = String(message).replace(/[\r\n]/g, "");
1459
+ let formattedMessage = `[${timestamp}] ${level}: ${sanitizedMessage}`;
1459
1460
  if (data) {
1460
1461
  try {
1461
1462
  formattedMessage += `
1462
1463
  ${JSON.stringify(data, null, 2)}`;
1463
1464
  } catch (error) {
1465
+ const sanitizedError = String(error).replace(/[\r\n]/g, "");
1464
1466
  formattedMessage += `
1465
- [JSON.stringify Error/Circular]: ${error}`;
1467
+ [JSON.stringify Error/Circular]: ${sanitizedError}`;
1466
1468
  }
1467
1469
  }
1468
1470
  return formattedMessage;