@topconsultnpm/sdkui-react 6.21.0-dev4.2 → 6.21.0-dev4.3

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.
@@ -23,8 +23,8 @@ export var ButtonNames;
23
23
  // Dimensioni minime di default per i popup
24
24
  const DEFAULT_MIN_WIDTH = 500;
25
25
  const DEFAULT_MIN_HEIGHT = 400;
26
- // filtr password from all errors.
27
- const SENSITIVE_KEY = 'password';
26
+ // filtr sensitive keys from all errors.
27
+ const SENSITIVE_KEYS = ['password', 'username'];
28
28
  const redactSensitiveJsonString = (value) => {
29
29
  const trimmed = value.trim();
30
30
  const looksLikeJson = (trimmed.startsWith('{') && trimmed.endsWith('}')) || (trimmed.startsWith('[') && trimmed.endsWith(']'));
@@ -46,7 +46,7 @@ const redactSensitiveValue = (value) => {
46
46
  return value;
47
47
  const result = {};
48
48
  for (const key of Object.keys(value)) {
49
- result[key] = key.toLowerCase() === SENSITIVE_KEY ? '***' : redactSensitiveValue(value[key]);
49
+ result[key] = SENSITIVE_KEYS.includes(key.toLowerCase()) ? '***' : redactSensitiveValue(value[key]);
50
50
  }
51
51
  return result;
52
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.21.0-dev4.2",
3
+ "version": "6.21.0-dev4.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1",