@angular-helpers/security 22.1.0 → 22.3.0
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, PLATFORM_ID,
|
|
2
|
+
import { Injectable, InjectionToken, inject, PLATFORM_ID, DestroyRef, signal, computed, NgZone, Injector, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { injectPlatform, injectWorkerPool } from '@angular-helpers/core';
|
|
4
4
|
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
5
5
|
import { Observable, Subject, fromEvent, merge } from 'rxjs';
|
|
@@ -224,26 +224,37 @@ class RegexAnalyzerService {
|
|
|
224
224
|
const levels = { low: 1, medium: 2, high: 3, critical: 4 };
|
|
225
225
|
return levels[risk] || 0;
|
|
226
226
|
}
|
|
227
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
228
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexAnalyzerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
228
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexAnalyzerService });
|
|
229
229
|
}
|
|
230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexAnalyzerService, decorators: [{
|
|
231
231
|
type: Injectable
|
|
232
232
|
}] });
|
|
233
233
|
|
|
234
|
+
const REGEX_WORKER_INLINE = '"use strict";\n(() => {\n // packages/security/src/workers/regex.worker.ts\n self.addEventListener("message", function(event) {\n const task = event.data;\n if (task.type === "regex-test") {\n const { pattern, text } = task.data;\n const startTime = performance.now();\n try {\n const regex = new RegExp(pattern, "g");\n const matches = [];\n let match;\n while ((match = regex.exec(text)) !== null) {\n matches.push([...match]);\n if (matches.length > 1e3) {\n throw new Error("Too many matches - possible infinite loop");\n }\n }\n const groups = {};\n if (matches.length > 0) {\n const firstMatch = matches[0];\n for (let i = 1; i < firstMatch.length; i++) {\n groups[`group${i}`] = firstMatch[i];\n }\n }\n self.postMessage({\n id: task.id,\n type: "regex-result",\n data: {\n match: matches.length > 0,\n matches,\n groups,\n executionTime: performance.now() - startTime,\n timeout: false\n }\n });\n } catch (error) {\n self.postMessage({\n id: task.id,\n type: "regex-result",\n data: {\n match: false,\n executionTime: performance.now() - startTime,\n timeout: false,\n error: error instanceof Error ? error.message : "Execution error"\n }\n });\n }\n }\n });\n})();\n';
|
|
235
|
+
|
|
236
|
+
const REGEX_WORKER_CONFIG = new InjectionToken('REGEX_WORKER_CONFIG');
|
|
234
237
|
/**
|
|
235
238
|
* Service responsible for managing Web Workers for safe regex execution.
|
|
236
239
|
* Avoids creating a new worker for every single execution.
|
|
237
240
|
*/
|
|
238
241
|
class RegexWorkerPoolService {
|
|
242
|
+
config = inject(REGEX_WORKER_CONFIG, { optional: true });
|
|
239
243
|
pool;
|
|
240
244
|
constructor() {
|
|
241
245
|
const { document } = injectPlatform();
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
let workerUrl;
|
|
247
|
+
if (this.config?.workerUrl) {
|
|
248
|
+
workerUrl = this.config.workerUrl;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
workerUrl = document
|
|
252
|
+
? new URL('assets/workers/regex.worker.js', document.baseURI)
|
|
253
|
+
: new URL('assets/workers/regex.worker.js', 'https://example.com'); // SSR: never instantiated
|
|
254
|
+
}
|
|
245
255
|
this.pool = injectWorkerPool(workerUrl, {
|
|
246
256
|
defaultTimeout: 5000,
|
|
257
|
+
fallbackWorkerCode: REGEX_WORKER_INLINE,
|
|
247
258
|
fallbackExecutor: async (type, data) => {
|
|
248
259
|
if (type !== 'regex-test')
|
|
249
260
|
throw new Error(`Unknown task type: ${type}`);
|
|
@@ -292,10 +303,10 @@ class RegexWorkerPoolService {
|
|
|
292
303
|
ngOnDestroy() {
|
|
293
304
|
this.pool.terminate();
|
|
294
305
|
}
|
|
295
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
296
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexWorkerPoolService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
307
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexWorkerPoolService });
|
|
297
308
|
}
|
|
298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexWorkerPoolService, decorators: [{
|
|
299
310
|
type: Injectable
|
|
300
311
|
}], ctorParameters: () => [] });
|
|
301
312
|
|
|
@@ -362,10 +373,10 @@ class RegexSecurityService {
|
|
|
362
373
|
safeMode: config.safeMode || false,
|
|
363
374
|
};
|
|
364
375
|
}
|
|
365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
366
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
376
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexSecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
377
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexSecurityService });
|
|
367
378
|
}
|
|
368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RegexSecurityService, decorators: [{
|
|
369
380
|
type: Injectable
|
|
370
381
|
}] });
|
|
371
382
|
|
|
@@ -484,10 +495,10 @@ class WebCryptoService {
|
|
|
484
495
|
hmacHashName(algorithm) {
|
|
485
496
|
return algorithm.replace('HMAC-', '');
|
|
486
497
|
}
|
|
487
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
488
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
498
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WebCryptoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
499
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WebCryptoService });
|
|
489
500
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: WebCryptoService, decorators: [{
|
|
491
502
|
type: Injectable
|
|
492
503
|
}] });
|
|
493
504
|
|
|
@@ -675,10 +686,10 @@ class SecureStorageService {
|
|
|
675
686
|
base64ToBytes(base64) {
|
|
676
687
|
return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
|
|
677
688
|
}
|
|
678
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
679
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
689
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SecureStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
690
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SecureStorageService });
|
|
680
691
|
}
|
|
681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SecureStorageService, decorators: [{
|
|
682
693
|
type: Injectable
|
|
683
694
|
}], ctorParameters: () => [] });
|
|
684
695
|
|
|
@@ -1063,10 +1074,10 @@ class InputSanitizerService {
|
|
|
1063
1074
|
return null;
|
|
1064
1075
|
}
|
|
1065
1076
|
}
|
|
1066
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1067
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1077
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: InputSanitizerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1078
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: InputSanitizerService });
|
|
1068
1079
|
}
|
|
1069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1080
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: InputSanitizerService, decorators: [{
|
|
1070
1081
|
type: Injectable
|
|
1071
1082
|
}], ctorParameters: () => [] });
|
|
1072
1083
|
|
|
@@ -1098,10 +1109,10 @@ class PasswordStrengthService {
|
|
|
1098
1109
|
assess(password) {
|
|
1099
1110
|
return assessPasswordStrength(password);
|
|
1100
1111
|
}
|
|
1101
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1102
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: PasswordStrengthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1113
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: PasswordStrengthService });
|
|
1103
1114
|
}
|
|
1104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: PasswordStrengthService, decorators: [{
|
|
1105
1116
|
type: Injectable
|
|
1106
1117
|
}] });
|
|
1107
1118
|
|
|
@@ -1213,10 +1224,10 @@ class JwtService {
|
|
|
1213
1224
|
}
|
|
1214
1225
|
return payload[name] ?? null;
|
|
1215
1226
|
}
|
|
1216
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1217
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: JwtService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1228
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: JwtService });
|
|
1218
1229
|
}
|
|
1219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: JwtService, decorators: [{
|
|
1220
1231
|
type: Injectable
|
|
1221
1232
|
}] });
|
|
1222
1233
|
function base64UrlDecode(input) {
|
|
@@ -1359,10 +1370,10 @@ class SensitiveClipboardService {
|
|
|
1359
1370
|
// ignore
|
|
1360
1371
|
}
|
|
1361
1372
|
}
|
|
1362
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1363
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1373
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SensitiveClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1374
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SensitiveClipboardService });
|
|
1364
1375
|
}
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SensitiveClipboardService, decorators: [{
|
|
1366
1377
|
type: Injectable
|
|
1367
1378
|
}], ctorParameters: () => [] });
|
|
1368
1379
|
|
|
@@ -1435,10 +1446,10 @@ class HibpService {
|
|
|
1435
1446
|
const match = findSuffixMatch(body, suffix);
|
|
1436
1447
|
return match > 0 ? { leaked: true, count: match } : { leaked: false, count: 0 };
|
|
1437
1448
|
}
|
|
1438
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1439
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1449
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: HibpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1450
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: HibpService, providedIn: 'root' });
|
|
1440
1451
|
}
|
|
1441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: HibpService, decorators: [{
|
|
1442
1453
|
type: Injectable,
|
|
1443
1454
|
args: [{
|
|
1444
1455
|
providedIn: 'root',
|
|
@@ -1661,10 +1672,10 @@ class RateLimiterService {
|
|
|
1661
1672
|
}, timeToExpiryMs);
|
|
1662
1673
|
}
|
|
1663
1674
|
}
|
|
1664
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1665
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1675
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RateLimiterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1676
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RateLimiterService });
|
|
1666
1677
|
}
|
|
1667
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RateLimiterService, decorators: [{
|
|
1668
1679
|
type: Injectable
|
|
1669
1680
|
}], ctorParameters: () => [] });
|
|
1670
1681
|
function validatePolicy(policy) {
|
|
@@ -1743,10 +1754,10 @@ class CsrfService {
|
|
|
1743
1754
|
get nativeStorage() {
|
|
1744
1755
|
return this.storageTarget === 'session' ? sessionStorage : localStorage;
|
|
1745
1756
|
}
|
|
1746
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1747
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1757
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CsrfService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1758
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CsrfService });
|
|
1748
1759
|
}
|
|
1749
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CsrfService, decorators: [{
|
|
1750
1761
|
type: Injectable
|
|
1751
1762
|
}], ctorParameters: () => [] });
|
|
1752
1763
|
const DEFAULT_HEADER_NAME = 'X-CSRF-Token';
|
|
@@ -1885,10 +1896,10 @@ class SessionIdleService {
|
|
|
1885
1896
|
this.config = null;
|
|
1886
1897
|
});
|
|
1887
1898
|
}
|
|
1888
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1889
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1899
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SessionIdleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1900
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SessionIdleService, providedIn: 'root' });
|
|
1890
1901
|
}
|
|
1891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SessionIdleService, decorators: [{
|
|
1892
1903
|
type: Injectable,
|
|
1893
1904
|
args: [{
|
|
1894
1905
|
providedIn: 'root',
|
|
@@ -1989,10 +2000,10 @@ class SecureMessageService {
|
|
|
1989
2000
|
this._messages$.next(message);
|
|
1990
2001
|
});
|
|
1991
2002
|
}
|
|
1992
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1993
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
2003
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SecureMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2004
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SecureMessageService, providedIn: 'root' });
|
|
1994
2005
|
}
|
|
1995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2006
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: SecureMessageService, decorators: [{
|
|
1996
2007
|
type: Injectable,
|
|
1997
2008
|
args: [{
|
|
1998
2009
|
providedIn: 'root',
|
|
@@ -2363,10 +2374,10 @@ class CspService {
|
|
|
2363
2374
|
issues,
|
|
2364
2375
|
};
|
|
2365
2376
|
}
|
|
2366
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2367
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
2377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CspService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2378
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CspService, providedIn: 'root' });
|
|
2368
2379
|
}
|
|
2369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: CspService, decorators: [{
|
|
2370
2381
|
type: Injectable,
|
|
2371
2382
|
args: [{
|
|
2372
2383
|
providedIn: 'root',
|
|
@@ -2377,4 +2388,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
|
|
|
2377
2388
|
* Generated bundle index. Do not edit.
|
|
2378
2389
|
*/
|
|
2379
2390
|
|
|
2380
|
-
export { CSRF_CONFIG, ClipboardUnsupportedError, CspPolicyBuilder, CspService, CsrfService, DEFAULT_ALLOWED_ATTRIBUTES, DEFAULT_ALLOWED_TAGS, HIBP_CONFIG, HibpService, InputSanitizerService, InvalidJwtError, JwtService, PasswordStrengthService, RATE_LIMITER_CONFIG, RateLimitExceededError, RateLimiterService, RegexAnalyzerService, RegexSecurityBuilder, RegexSecurityService, RegexWorkerPoolService, SANITIZER_CONFIG, SECURE_STORAGE_CONFIG, SecureMessageService, SecureStorageService, SensitiveClipboardService, SessionIdleService, WebCryptoService, assessPasswordStrength, containsScriptInjection, containsSqlInjectionHints, defaultSecurityConfig, isHtmlSafe, isUrlSafe, parseCsp, provideCsrf, provideHibp, provideInputSanitizer, provideJwt, providePasswordStrength, provideRateLimiter, provideRegexSecurity, provideSecureMessage, provideSecureStorage, provideSecurity, provideSensitiveClipboard, provideSessionIdle, provideWebCrypto, sanitizeHtmlString, sanitizeUrlString, serializeCsp, withCsrfHeader };
|
|
2391
|
+
export { CSRF_CONFIG, ClipboardUnsupportedError, CspPolicyBuilder, CspService, CsrfService, DEFAULT_ALLOWED_ATTRIBUTES, DEFAULT_ALLOWED_TAGS, HIBP_CONFIG, HibpService, InputSanitizerService, InvalidJwtError, JwtService, PasswordStrengthService, RATE_LIMITER_CONFIG, REGEX_WORKER_CONFIG, RateLimitExceededError, RateLimiterService, RegexAnalyzerService, RegexSecurityBuilder, RegexSecurityService, RegexWorkerPoolService, SANITIZER_CONFIG, SECURE_STORAGE_CONFIG, SecureMessageService, SecureStorageService, SensitiveClipboardService, SessionIdleService, WebCryptoService, assessPasswordStrength, containsScriptInjection, containsSqlInjectionHints, defaultSecurityConfig, isHtmlSafe, isUrlSafe, parseCsp, provideCsrf, provideHibp, provideInputSanitizer, provideJwt, providePasswordStrength, provideRateLimiter, provideRegexSecurity, provideSecureMessage, provideSecureStorage, provideSecurity, provideSensitiveClipboard, provideSessionIdle, provideWebCrypto, sanitizeHtmlString, sanitizeUrlString, serializeCsp, withCsrfHeader };
|
package/package.json
CHANGED
|
@@ -862,11 +862,16 @@ declare class RegexAnalyzerService {
|
|
|
862
862
|
static ɵprov: i0.ɵɵInjectableDeclaration<RegexAnalyzerService>;
|
|
863
863
|
}
|
|
864
864
|
|
|
865
|
+
interface RegexWorkerConfig {
|
|
866
|
+
workerUrl?: string | URL;
|
|
867
|
+
}
|
|
868
|
+
declare const REGEX_WORKER_CONFIG: InjectionToken<RegexWorkerConfig>;
|
|
865
869
|
/**
|
|
866
870
|
* Service responsible for managing Web Workers for safe regex execution.
|
|
867
871
|
* Avoids creating a new worker for every single execution.
|
|
868
872
|
*/
|
|
869
873
|
declare class RegexWorkerPoolService implements OnDestroy {
|
|
874
|
+
private config;
|
|
870
875
|
private pool;
|
|
871
876
|
constructor();
|
|
872
877
|
/**
|
|
@@ -964,5 +969,5 @@ declare class CspService {
|
|
|
964
969
|
static ɵprov: i0.ɵɵInjectableDeclaration<CspService>;
|
|
965
970
|
}
|
|
966
971
|
|
|
967
|
-
export { CSRF_CONFIG, ClipboardUnsupportedError, CspPolicyBuilder, CspService, CsrfService, DEFAULT_ALLOWED_ATTRIBUTES, DEFAULT_ALLOWED_TAGS, HIBP_CONFIG, HibpService, InputSanitizerService, InvalidJwtError, JwtService, PasswordStrengthService, RATE_LIMITER_CONFIG, RateLimitExceededError, RateLimiterService, RegexAnalyzerService, RegexSecurityBuilder, RegexSecurityService, RegexWorkerPoolService, SANITIZER_CONFIG, SECURE_STORAGE_CONFIG, SecureMessageService, SecureStorageService, SensitiveClipboardService, SessionIdleService, WebCryptoService, assessPasswordStrength, containsScriptInjection, containsSqlInjectionHints, defaultSecurityConfig, isHtmlSafe, isUrlSafe, parseCsp, provideCsrf, provideHibp, provideInputSanitizer, provideJwt, providePasswordStrength, provideRateLimiter, provideRegexSecurity, provideSecureMessage, provideSecureStorage, provideSecurity, provideSensitiveClipboard, provideSessionIdle, provideWebCrypto, sanitizeHtmlString, sanitizeUrlString, serializeCsp, withCsrfHeader };
|
|
968
|
-
export type { AesEncryptResult, AesKeyLength, CopyStatus, CspAuditIssue, CspAuditReport, CspDirectives, CsrfConfig, CsrfHeaderOptions, CsrfStorageTarget, HashAlgorithm, HibpConfig, HibpResult, HmacAlgorithm, HtmlSanitizerOptions, HttpMethod, JwtStandardClaims, PasswordAssessment, PasswordLabel, PasswordScore, PasswordStrengthResult, RateLimitPolicy, RateLimiterConfig, RegexBuilderOptions, RegexSecurityConfig, RegexSecurityResult, RegexTestResult, SanitizerConfig, SecureMessage, SecureMessageConfig, SecureStorageConfig, SecurityConfig, SensitiveCopyOptions, SessionIdleConfig, StorageTarget };
|
|
972
|
+
export { CSRF_CONFIG, ClipboardUnsupportedError, CspPolicyBuilder, CspService, CsrfService, DEFAULT_ALLOWED_ATTRIBUTES, DEFAULT_ALLOWED_TAGS, HIBP_CONFIG, HibpService, InputSanitizerService, InvalidJwtError, JwtService, PasswordStrengthService, RATE_LIMITER_CONFIG, REGEX_WORKER_CONFIG, RateLimitExceededError, RateLimiterService, RegexAnalyzerService, RegexSecurityBuilder, RegexSecurityService, RegexWorkerPoolService, SANITIZER_CONFIG, SECURE_STORAGE_CONFIG, SecureMessageService, SecureStorageService, SensitiveClipboardService, SessionIdleService, WebCryptoService, assessPasswordStrength, containsScriptInjection, containsSqlInjectionHints, defaultSecurityConfig, isHtmlSafe, isUrlSafe, parseCsp, provideCsrf, provideHibp, provideInputSanitizer, provideJwt, providePasswordStrength, provideRateLimiter, provideRegexSecurity, provideSecureMessage, provideSecureStorage, provideSecurity, provideSensitiveClipboard, provideSessionIdle, provideWebCrypto, sanitizeHtmlString, sanitizeUrlString, serializeCsp, withCsrfHeader };
|
|
973
|
+
export type { AesEncryptResult, AesKeyLength, CopyStatus, CspAuditIssue, CspAuditReport, CspDirectives, CsrfConfig, CsrfHeaderOptions, CsrfStorageTarget, HashAlgorithm, HibpConfig, HibpResult, HmacAlgorithm, HtmlSanitizerOptions, HttpMethod, JwtStandardClaims, PasswordAssessment, PasswordLabel, PasswordScore, PasswordStrengthResult, RateLimitPolicy, RateLimiterConfig, RegexBuilderOptions, RegexSecurityConfig, RegexSecurityResult, RegexTestResult, RegexWorkerConfig, SanitizerConfig, SecureMessage, SecureMessageConfig, SecureStorageConfig, SecurityConfig, SensitiveCopyOptions, SessionIdleConfig, StorageTarget };
|