@forge/manifest 12.1.0-next.1 → 12.1.0-next.2-experimental-e5e0b64
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,5 +1,22 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
+
## 12.1.0-next.2-experimental-e5e0b64
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e4c143c: Do not allow wildcard remote endpoints
|
|
8
|
+
- 19807bf: Changed schema for container resources
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- fa9b5aa: Update manifest definitions
|
|
13
|
+
|
|
14
|
+
## 12.1.0-next.2
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- e4c143c: Do not allow wildcard remote endpoints
|
|
19
|
+
|
|
3
20
|
## 12.1.0-next.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -28,9 +28,9 @@ class PermissionsValidator {
|
|
|
28
28
|
remotesHasValidEntryForKey(remoteMap, key) {
|
|
29
29
|
return (remoteMap !== undefined &&
|
|
30
30
|
remoteMap.has(key) &&
|
|
31
|
-
(remoteMap.get(key) === null || this.isValidURL(remoteMap.get(key))));
|
|
31
|
+
(remoteMap.get(key) === null || this.isValidURL(remoteMap.get(key), false)));
|
|
32
32
|
}
|
|
33
|
-
isValidURL(inputURL) {
|
|
33
|
+
isValidURL(inputURL, allowGlobalUrl) {
|
|
34
34
|
const protocolRegex = /^(.*?:\/\/)/;
|
|
35
35
|
const validURI = /^(\*\.)?[.a-zA-Z0-9_\-\/:~#%?=&]+$/;
|
|
36
36
|
const allowedProtocols = ['https:', 'wss:'];
|
|
@@ -38,8 +38,8 @@ class PermissionsValidator {
|
|
|
38
38
|
if (inputURL.length > MAX_URL_LENGTH) {
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
|
-
if (inputURL ===
|
|
42
|
-
return
|
|
41
|
+
if (inputURL === egress_types_1.GLOBAL_URL) {
|
|
42
|
+
return allowGlobalUrl;
|
|
43
43
|
}
|
|
44
44
|
const customURLSchemeRegex = /^[a-zA-Z]+:(\\\\)?/;
|
|
45
45
|
if (customURLSchemeRegex.test(inputURL) &&
|
|
@@ -81,7 +81,7 @@ class PermissionsValidator {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
validateExternalPermissionURLs(result, extPermType, perms, manifest) {
|
|
84
|
-
const invalidPerms = perms?.filter((key) => !this.isValidURL(key));
|
|
84
|
+
const invalidPerms = perms?.filter((key) => !this.isValidURL(key, true));
|
|
85
85
|
if (invalidPerms?.length) {
|
|
86
86
|
this.addValidationErrors(result, extPermType, invalidPerms, manifest);
|
|
87
87
|
}
|