From 07b6e497c769d8f295b93b035f9870af63cd97b1 Mon Sep 17 00:00:00 2001 From: Sam Olsen Date: Thu, 15 Dec 2022 11:02:30 -0800 Subject: [PATCH 1/3] Bump storage rules emulator version; correct null_value field accordingly --- src/emulator/downloadableEmulators.ts | 6 +++--- src/emulator/storage/rules/runtime.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/emulator/downloadableEmulators.ts b/src/emulator/downloadableEmulators.ts index d307cc5567f..4bdf7d6bfdc 100644 --- a/src/emulator/downloadableEmulators.ts +++ b/src/emulator/downloadableEmulators.ts @@ -38,9 +38,9 @@ const EMULATOR_UPDATE_DETAILS: { [s in DownloadableEmulators]: EmulatorUpdateDet expectedChecksum: "4f41d24a3c0f3b55ea22804a424cc0ee", }, storage: { - version: "1.1.1", - expectedSize: 46448285, - expectedChecksum: "691982db4019d49d345a97151bdea7e2", + version: "1.1.2", + expectedSize: 47028740, + expectedChecksum: "983b4415b1e72b109864f1b8e7ea7546", }, ui: experiments.isEnabled("emulatoruisnapshot") ? { version: "SNAPSHOT", expectedSize: -1, expectedChecksum: "" } diff --git a/src/emulator/storage/rules/runtime.ts b/src/emulator/storage/rules/runtime.ts index 1f53eb05bfd..127cddd8890 100644 --- a/src/emulator/storage/rules/runtime.ts +++ b/src/emulator/storage/rules/runtime.ts @@ -415,7 +415,7 @@ function toExpressionValue(obj: any): ExpressionValue { if (obj == null) { return { - null_value: 0, + null_value: null, }; } @@ -484,7 +484,7 @@ function createRequestExpressionValue(opts: RulesetVerificationOpts): Expression }, time: toExpressionValue(new Date()), resource: toExpressionValue(opts.file.after ? opts.file.after : null), - auth: opts.token ? createAuthExpressionValue(opts) : { null_value: 0 }, + auth: opts.token ? createAuthExpressionValue(opts) : { null_value: null }, }; return { From 170f66023110be7db40bd40376719c160f108350 Mon Sep 17 00:00:00 2001 From: Sam Olsen Date: Thu, 15 Dec 2022 14:10:18 -0800 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9222ed5c7b5..a90e87fd3c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,3 +3,4 @@ - Support Next.js Middleware (#5320) - Log the reason for a Cloud Function if needed in Next.js (#5320) - Fixed service enablement when installing extensions with v2 functions (#5338) +- Fixed bug with Cross-Service Rules integration for Firestore documents containing nulls (#5342) From 90b4d24e65373630999b5e36b077c66d13c259b6 Mon Sep 17 00:00:00 2001 From: Sam Olsen Date: Fri, 16 Dec 2022 10:38:31 -0800 Subject: [PATCH 3/3] Format --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b26d784e69b..4d8cb15c9e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,4 +6,4 @@ - Log the reason for a Cloud Function if needed in Next.js (#5320) - Fixed service enablement when installing extensions with v2 functions (#5338) - Fix bug where functions:shell command didn't connect to emulators running on other processes. (#5269) -- Fixed bug with Cross-Service Rules integration for Firestore documents containing nulls (#5342) \ No newline at end of file +- Fixed bug with Cross-Service Rules integration for Firestore documents containing nulls (#5342)