Skip to content

Commit

Permalink
Fix regex pattern used to verify Cloud Storage bucket name (#8157)
Browse files Browse the repository at this point in the history
Co-authored-by: joehan <[email protected]>
  • Loading branch information
aalej and joehan authored Feb 4, 2025
1 parent e0d4a43 commit f32769b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fixed issue where Extensions deployment fails due to `*.firebasestorage.app` not being recognized as a valid Storage bucket name. (#8152)
- Fixes issue with custom 404 pages not being returned in Next.js in the emulator (#8035).
- Annotate onCallGenkit functions to allow for future Firebase Console annotations (#8135)
- Adds genkit 1.0.0 template (#8144)
2 changes: 1 addition & 1 deletion src/extensions/provisioningHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async function isStorageProvisioned(projectId: string): Promise<boolean> {
// Bucket resource name looks like: projects/PROJECT_NUMBER/buckets/BUCKET_NAME
// and we just need the BUCKET_NAME part.
const bucketResourceNameTokens = bucketResourceName.split("/");
const pattern = "^" + projectId + "(.[[a-z0-9]+)*.appspot.com$";
const pattern = "^" + projectId + "(.[[a-z0-9]+)*.(appspot.com|firebasestorage.app)$";
return new RegExp(pattern).test(bucketResourceNameTokens[bucketResourceNameTokens.length - 1]);
});
}
Expand Down

0 comments on commit f32769b

Please sign in to comment.