@angular-helpers/security 21.4.1 → 21.4.2
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/README.md +1 -1
- package/fesm2022/angular-helpers-security.mjs +40 -37
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -286,10 +286,10 @@ class RegexSecurityService {
|
|
|
286
286
|
});
|
|
287
287
|
this.workers.clear();
|
|
288
288
|
}
|
|
289
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
290
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
289
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RegexSecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
290
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RegexSecurityService });
|
|
291
291
|
}
|
|
292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RegexSecurityService, decorators: [{
|
|
293
293
|
type: Injectable
|
|
294
294
|
}] });
|
|
295
295
|
/**
|
|
@@ -529,10 +529,10 @@ class WebCryptoService {
|
|
|
529
529
|
hmacHashName(algorithm) {
|
|
530
530
|
return algorithm.replace('HMAC-', '');
|
|
531
531
|
}
|
|
532
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
533
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
532
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: WebCryptoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
533
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: WebCryptoService });
|
|
534
534
|
}
|
|
535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: WebCryptoService, decorators: [{
|
|
536
536
|
type: Injectable
|
|
537
537
|
}] });
|
|
538
538
|
|
|
@@ -720,10 +720,10 @@ class SecureStorageService {
|
|
|
720
720
|
base64ToBytes(base64) {
|
|
721
721
|
return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
|
|
722
722
|
}
|
|
723
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
724
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
723
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SecureStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
724
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SecureStorageService });
|
|
725
725
|
}
|
|
726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SecureStorageService, decorators: [{
|
|
727
727
|
type: Injectable
|
|
728
728
|
}], ctorParameters: () => [] });
|
|
729
729
|
|
|
@@ -1068,10 +1068,10 @@ class InputSanitizerService {
|
|
|
1068
1068
|
return null;
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1072
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1071
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: InputSanitizerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1072
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: InputSanitizerService });
|
|
1073
1073
|
}
|
|
1074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1074
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: InputSanitizerService, decorators: [{
|
|
1075
1075
|
type: Injectable
|
|
1076
1076
|
}], ctorParameters: () => [] });
|
|
1077
1077
|
|
|
@@ -1103,10 +1103,10 @@ class PasswordStrengthService {
|
|
|
1103
1103
|
assess(password) {
|
|
1104
1104
|
return assessPasswordStrength(password);
|
|
1105
1105
|
}
|
|
1106
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1107
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PasswordStrengthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1107
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PasswordStrengthService });
|
|
1108
1108
|
}
|
|
1109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PasswordStrengthService, decorators: [{
|
|
1110
1110
|
type: Injectable
|
|
1111
1111
|
}] });
|
|
1112
1112
|
|
|
@@ -1218,10 +1218,10 @@ class JwtService {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
return payload[name] ?? null;
|
|
1220
1220
|
}
|
|
1221
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1222
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: JwtService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1222
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: JwtService });
|
|
1223
1223
|
}
|
|
1224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: JwtService, decorators: [{
|
|
1225
1225
|
type: Injectable
|
|
1226
1226
|
}] });
|
|
1227
1227
|
function base64UrlDecode(input) {
|
|
@@ -1364,10 +1364,10 @@ class SensitiveClipboardService {
|
|
|
1364
1364
|
// ignore
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1368
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1367
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SensitiveClipboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1368
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SensitiveClipboardService });
|
|
1369
1369
|
}
|
|
1370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SensitiveClipboardService, decorators: [{
|
|
1371
1371
|
type: Injectable
|
|
1372
1372
|
}], ctorParameters: () => [] });
|
|
1373
1373
|
|
|
@@ -1440,11 +1440,14 @@ class HibpService {
|
|
|
1440
1440
|
const match = findSuffixMatch(body, suffix);
|
|
1441
1441
|
return match > 0 ? { leaked: true, count: match } : { leaked: false, count: 0 };
|
|
1442
1442
|
}
|
|
1443
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1444
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1443
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: HibpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1444
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: HibpService, providedIn: 'root' });
|
|
1445
1445
|
}
|
|
1446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1447
|
-
type: Injectable
|
|
1446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: HibpService, decorators: [{
|
|
1447
|
+
type: Injectable,
|
|
1448
|
+
args: [{
|
|
1449
|
+
providedIn: 'root',
|
|
1450
|
+
}]
|
|
1448
1451
|
}], ctorParameters: () => [] });
|
|
1449
1452
|
function findSuffixMatch(body, suffix) {
|
|
1450
1453
|
const lines = body.split(/\r?\n/);
|
|
@@ -1612,10 +1615,10 @@ class RateLimiterService {
|
|
|
1612
1615
|
bucket.lastRefillAt = now;
|
|
1613
1616
|
bucket.remaining.set(Math.floor(bucket.tokens));
|
|
1614
1617
|
}
|
|
1615
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1616
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1618
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RateLimiterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1619
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RateLimiterService });
|
|
1617
1620
|
}
|
|
1618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RateLimiterService, decorators: [{
|
|
1619
1622
|
type: Injectable
|
|
1620
1623
|
}], ctorParameters: () => [] });
|
|
1621
1624
|
function validatePolicy(policy) {
|
|
@@ -1694,10 +1697,10 @@ class CsrfService {
|
|
|
1694
1697
|
get nativeStorage() {
|
|
1695
1698
|
return this.storageTarget === 'session' ? sessionStorage : localStorage;
|
|
1696
1699
|
}
|
|
1697
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1698
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1700
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: CsrfService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1701
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: CsrfService });
|
|
1699
1702
|
}
|
|
1700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: CsrfService, decorators: [{
|
|
1701
1704
|
type: Injectable
|
|
1702
1705
|
}], ctorParameters: () => [] });
|
|
1703
1706
|
const DEFAULT_HEADER_NAME = 'X-CSRF-Token';
|
|
@@ -1833,10 +1836,10 @@ class SessionIdleService {
|
|
|
1833
1836
|
this.config = null;
|
|
1834
1837
|
});
|
|
1835
1838
|
}
|
|
1836
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1837
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1839
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SessionIdleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1840
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SessionIdleService, providedIn: 'root' });
|
|
1838
1841
|
}
|
|
1839
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SessionIdleService, decorators: [{
|
|
1840
1843
|
type: Injectable,
|
|
1841
1844
|
args: [{
|
|
1842
1845
|
providedIn: 'root',
|
|
@@ -1936,10 +1939,10 @@ class SecureMessageService {
|
|
|
1936
1939
|
this._messages$.next(message);
|
|
1937
1940
|
});
|
|
1938
1941
|
}
|
|
1939
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1940
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1942
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SecureMessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1943
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SecureMessageService, providedIn: 'root' });
|
|
1941
1944
|
}
|
|
1942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: SecureMessageService, decorators: [{
|
|
1943
1946
|
type: Injectable,
|
|
1944
1947
|
args: [{
|
|
1945
1948
|
providedIn: 'root',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-helpers/security",
|
|
3
|
-
"version": "21.4.
|
|
3
|
+
"version": "21.4.2",
|
|
4
4
|
"description": "Angular security helpers for preventing ReDoS and other security vulnerabilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -71,4 +71,4 @@
|
|
|
71
71
|
},
|
|
72
72
|
"sideEffects": false,
|
|
73
73
|
"type": "module"
|
|
74
|
-
}
|
|
74
|
+
}
|