@firebase/util 1.9.2 → 1.9.3-20230301191949
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 +6 -0
- package/dist/index.cjs.js +11 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +11 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +15 -3
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +14 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +11 -2
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/crypt.d.ts +6 -0
- package/dist/src/crypt.d.ts +6 -0
- package/dist/util-public.d.ts +7 -0
- package/dist/util.d.ts +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @firebase/util
|
|
2
2
|
|
|
3
|
+
## 1.9.3-20230301191949
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c59f537b1`](https://github.com/firebase/firebase-js-sdk/commit/c59f537b1262b5d7997291b8c1e9324d378effb6) [#7019](https://github.com/firebase/firebase-js-sdk/pull/7019) - Modify base64 decoding logic to throw on invalid input, rather than silently truncating it.
|
|
8
|
+
|
|
3
9
|
## 1.9.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -304,7 +304,7 @@ const base64 = {
|
|
|
304
304
|
const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;
|
|
305
305
|
++i;
|
|
306
306
|
if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {
|
|
307
|
-
throw
|
|
307
|
+
throw new DecodeBase64StringError();
|
|
308
308
|
}
|
|
309
309
|
const outByte1 = (byte1 << 2) | (byte2 >> 4);
|
|
310
310
|
output.push(outByte1);
|
|
@@ -345,6 +345,15 @@ const base64 = {
|
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
|
+
/**
|
|
349
|
+
* An error encountered while decoding base64 string.
|
|
350
|
+
*/
|
|
351
|
+
class DecodeBase64StringError extends Error {
|
|
352
|
+
constructor() {
|
|
353
|
+
super(...arguments);
|
|
354
|
+
this.name = 'DecodeBase64StringError';
|
|
355
|
+
}
|
|
356
|
+
}
|
|
348
357
|
/**
|
|
349
358
|
* URL-safe base64 encoding
|
|
350
359
|
*/
|
|
@@ -2104,6 +2113,7 @@ function getModularInstance(service) {
|
|
|
2104
2113
|
}
|
|
2105
2114
|
|
|
2106
2115
|
exports.CONSTANTS = CONSTANTS;
|
|
2116
|
+
exports.DecodeBase64StringError = DecodeBase64StringError;
|
|
2107
2117
|
exports.Deferred = Deferred;
|
|
2108
2118
|
exports.ErrorFactory = ErrorFactory;
|
|
2109
2119
|
exports.FirebaseError = FirebaseError;
|