@angular-helpers/security 21.6.0 → 22.0.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.
|
@@ -223,10 +223,10 @@ class RegexAnalyzerService {
|
|
|
223
223
|
const levels = { low: 1, medium: 2, high: 3, critical: 4 };
|
|
224
224
|
return levels[risk] || 0;
|
|
225
225
|
}
|
|
226
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
227
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexAnalyzerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
227
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexAnalyzerService });
|
|
228
228
|
}
|
|
229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexAnalyzerService, decorators: [{
|
|
230
230
|
type: Injectable
|
|
231
231
|
}] });
|
|
232
232
|
|
|
@@ -287,10 +287,10 @@ class RegexWorkerPoolService {
|
|
|
287
287
|
ngOnDestroy() {
|
|
288
288
|
this.pool.terminate();
|
|
289
289
|
}
|
|
290
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
291
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
290
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexWorkerPoolService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
291
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexWorkerPoolService });
|
|
292
292
|
}
|
|
293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexWorkerPoolService, decorators: [{
|
|
294
294
|
type: Injectable
|
|
295
295
|
}], ctorParameters: () => [] });
|
|
296
296
|
|
|
@@ -357,10 +357,10 @@ class RegexSecurityService {
|
|
|
357
357
|
safeMode: config.safeMode || false,
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
361
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
360
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexSecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
361
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexSecurityService });
|
|
362
362
|
}
|
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RegexSecurityService, decorators: [{
|
|
364
364
|
type: Injectable
|
|
365
365
|
}] });
|
|
366
366
|
|
|
@@ -479,10 +479,10 @@ class WebCryptoService {
|
|
|
479
479
|
hmacHashName(algorithm) {
|
|
480
480
|
return algorithm.replace('HMAC-', '');
|
|
481
481
|
}
|
|
482
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
483
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: WebCryptoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
483
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: WebCryptoService });
|
|
484
484
|
}
|
|
485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: WebCryptoService, decorators: [{
|
|
486
486
|
type: Injectable
|
|
487
487
|
}] });
|
|
488
488
|
|
|
@@ -670,10 +670,10 @@ class SecureStorageService {
|
|
|
670
670
|
base64ToBytes(base64) {
|
|
671
671
|
return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
|
|
672
672
|
}
|
|
673
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
674
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SecureStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
674
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SecureStorageService });
|
|
675
675
|
}
|
|
676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SecureStorageService, decorators: [{
|
|
677
677
|
type: Injectable
|
|
678
678
|
}], ctorParameters: () => [] });
|
|
679
679
|
|
|
@@ -830,7 +830,7 @@ function sanitizeUrlString(input, allowedSchemes = ['http:', 'https:']) {
|
|
|
830
830
|
function isUrlSafe(input, allowedSchemes = ['http:', 'https:']) {
|
|
831
831
|
return sanitizeUrlString(input, allowedSchemes) !== null;
|
|
832
832
|
}
|
|
833
|
-
const SCRIPT_INJECTION_PATTERN = /<\s*script\b|javascript:|on\w
|
|
833
|
+
const SCRIPT_INJECTION_PATTERN = /<\s*script\b|javascript:|on\w{1,30}\s*=/i;
|
|
834
834
|
/**
|
|
835
835
|
* Lightweight check for common script-injection sentinels. Complements (does NOT replace)
|
|
836
836
|
* a full HTML sanitizer or Content Security Policy.
|
|
@@ -1019,10 +1019,10 @@ class InputSanitizerService {
|
|
|
1019
1019
|
return null;
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1023
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1022
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: InputSanitizerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1023
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: InputSanitizerService });
|
|
1024
1024
|
}
|
|
1025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: InputSanitizerService, decorators: [{
|
|
1026
1026
|
type: Injectable
|
|
1027
1027
|
}], ctorParameters: () => [] });
|
|
1028
1028
|
|
|
@@ -1054,10 +1054,10 @@ class PasswordStrengthService {
|
|
|
1054
1054
|
assess(password) {
|
|
1055
1055
|
return assessPasswordStrength(password);
|
|
1056
1056
|
}
|
|
1057
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1058
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1057
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: PasswordStrengthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1058
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: PasswordStrengthService });
|
|
1059
1059
|
}
|
|
1060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: PasswordStrengthService, decorators: [{
|
|
1061
1061
|
type: Injectable
|
|
1062
1062
|
}] });
|
|
1063
1063
|
|
|
@@ -1169,10 +1169,10 @@ class JwtService {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
return payload[name] ?? null;
|
|
1171
1171
|
}
|
|
1172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1173
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: JwtService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1173
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: JwtService });
|
|
1174
1174
|
}
|
|
1175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: JwtService, decorators: [{
|
|
1176
1176
|
type: Injectable
|
|
1177
1177
|
}] });
|
|
1178
1178
|
function base64UrlDecode(input) {
|
|
@@ -1315,10 +1315,10 @@ class SensitiveClipboardService {
|
|
|
1315
1315
|
// ignore
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1319
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SensitiveClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1319
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SensitiveClipboardService });
|
|
1320
1320
|
}
|
|
1321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SensitiveClipboardService, decorators: [{
|
|
1322
1322
|
type: Injectable
|
|
1323
1323
|
}], ctorParameters: () => [] });
|
|
1324
1324
|
|
|
@@ -1391,10 +1391,10 @@ class HibpService {
|
|
|
1391
1391
|
const match = findSuffixMatch(body, suffix);
|
|
1392
1392
|
return match > 0 ? { leaked: true, count: match } : { leaked: false, count: 0 };
|
|
1393
1393
|
}
|
|
1394
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1395
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1394
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: HibpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1395
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: HibpService, providedIn: 'root' });
|
|
1396
1396
|
}
|
|
1397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: HibpService, decorators: [{
|
|
1398
1398
|
type: Injectable,
|
|
1399
1399
|
args: [{
|
|
1400
1400
|
providedIn: 'root',
|
|
@@ -1617,10 +1617,10 @@ class RateLimiterService {
|
|
|
1617
1617
|
}, timeToExpiryMs);
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1621
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1620
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RateLimiterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1621
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RateLimiterService });
|
|
1622
1622
|
}
|
|
1623
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: RateLimiterService, decorators: [{
|
|
1624
1624
|
type: Injectable
|
|
1625
1625
|
}], ctorParameters: () => [] });
|
|
1626
1626
|
function validatePolicy(policy) {
|
|
@@ -1699,10 +1699,10 @@ class CsrfService {
|
|
|
1699
1699
|
get nativeStorage() {
|
|
1700
1700
|
return this.storageTarget === 'session' ? sessionStorage : localStorage;
|
|
1701
1701
|
}
|
|
1702
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1703
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1702
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: CsrfService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1703
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: CsrfService });
|
|
1704
1704
|
}
|
|
1705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: CsrfService, decorators: [{
|
|
1706
1706
|
type: Injectable
|
|
1707
1707
|
}], ctorParameters: () => [] });
|
|
1708
1708
|
const DEFAULT_HEADER_NAME = 'X-CSRF-Token';
|
|
@@ -1742,9 +1742,12 @@ class SessionIdleService {
|
|
|
1742
1742
|
document = inject(DOCUMENT);
|
|
1743
1743
|
injector = inject(Injector);
|
|
1744
1744
|
destroyRef = inject(DestroyRef);
|
|
1745
|
-
_isIdle = signal(false,
|
|
1746
|
-
|
|
1747
|
-
|
|
1745
|
+
_isIdle = signal(false, /* @ts-ignore */
|
|
1746
|
+
...(ngDevMode ? [{ debugName: "_isIdle" }] : /* istanbul ignore next */ []));
|
|
1747
|
+
_isWarning = signal(false, /* @ts-ignore */
|
|
1748
|
+
...(ngDevMode ? [{ debugName: "_isWarning" }] : /* istanbul ignore next */ []));
|
|
1749
|
+
_timeRemaining = signal(null, /* @ts-ignore */
|
|
1750
|
+
...(ngDevMode ? [{ debugName: "_timeRemaining" }] : /* istanbul ignore next */ []));
|
|
1748
1751
|
_timeoutSubject = new Subject();
|
|
1749
1752
|
isIdle = this._isIdle.asReadonly();
|
|
1750
1753
|
isWarning = this._isWarning.asReadonly();
|
|
@@ -1838,10 +1841,10 @@ class SessionIdleService {
|
|
|
1838
1841
|
this.config = null;
|
|
1839
1842
|
});
|
|
1840
1843
|
}
|
|
1841
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1842
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1844
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SessionIdleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1845
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SessionIdleService, providedIn: 'root' });
|
|
1843
1846
|
}
|
|
1844
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SessionIdleService, decorators: [{
|
|
1845
1848
|
type: Injectable,
|
|
1846
1849
|
args: [{
|
|
1847
1850
|
providedIn: 'root',
|
|
@@ -1855,7 +1858,8 @@ class SecureMessageService {
|
|
|
1855
1858
|
document = inject(DOCUMENT);
|
|
1856
1859
|
crypto = inject(WebCryptoService);
|
|
1857
1860
|
config = null;
|
|
1858
|
-
_lastMessage = signal(null,
|
|
1861
|
+
_lastMessage = signal(null, /* @ts-ignore */
|
|
1862
|
+
...(ngDevMode ? [{ debugName: "_lastMessage" }] : /* istanbul ignore next */ []));
|
|
1859
1863
|
_messages$ = new Subject();
|
|
1860
1864
|
messageHandler = null;
|
|
1861
1865
|
get targetWindow() {
|
|
@@ -1941,10 +1945,10 @@ class SecureMessageService {
|
|
|
1941
1945
|
this._messages$.next(message);
|
|
1942
1946
|
});
|
|
1943
1947
|
}
|
|
1944
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1945
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1948
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SecureMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1949
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SecureMessageService, providedIn: 'root' });
|
|
1946
1950
|
}
|
|
1947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SecureMessageService, decorators: [{
|
|
1948
1952
|
type: Injectable,
|
|
1949
1953
|
args: [{
|
|
1950
1954
|
providedIn: 'root',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-helpers/security",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "Angular security helpers for preventing ReDoS and other security vulnerabilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@angular/common": "^
|
|
41
|
-
"@angular/core": "^
|
|
42
|
-
"@angular/forms": "^
|
|
40
|
+
"@angular/common": "^22.0.0",
|
|
41
|
+
"@angular/core": "^22.0.0",
|
|
42
|
+
"@angular/forms": "^22.0.0",
|
|
43
43
|
"rxjs": "^7.0.0 || ^8.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@angular-helpers/core": "^
|
|
51
|
+
"@angular-helpers/core": "^22.0.0",
|
|
52
52
|
"tslib": "^2.0.0"
|
|
53
53
|
},
|
|
54
54
|
"module": "fesm2022/angular-helpers-security.mjs",
|
|
@@ -72,4 +72,4 @@
|
|
|
72
72
|
},
|
|
73
73
|
"sideEffects": false,
|
|
74
74
|
"type": "module"
|
|
75
|
-
}
|
|
75
|
+
}
|