@crvouga/mockingbird-service-resource-groups-tagging-api 1.10.4 → 1.10.6

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,17 @@
1
1
  # Changelog — @crvouga/mockingbird-service-resource-groups-tagging-api
2
2
 
3
+ ## 1.10.6 (2026-11-02)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - save and replay a 500 the endpoint produced under an Idempotency-Key ([789bbcc](https://github.com/crvouga/mockingbird/commit/789bbcccb792cddaf27f4f6db6d2fcf2da1d07fe))
8
+
9
+ ## 1.10.5 (2026-11-02)
10
+
11
+ ### Fixes and improvements
12
+
13
+ - compare the admin key in constant time ([2a43141](https://github.com/crvouga/mockingbird/commit/2a43141f50dab41e698c3bbce0c69bf65b40e24e))
14
+
3
15
  ## 1.10.4 (2026-11-02)
4
16
 
5
17
  ### Fixes and improvements
@@ -6801,6 +6801,17 @@ var createNamespaceControls = (options) => {
6801
6801
  };
6802
6802
  };
6803
6803
 
6804
+ // ../core/dist/signing.js
6805
+ var encoder = new TextEncoder();
6806
+ var timingSafeEqual = (a, b) => {
6807
+ if (a.length !== b.length)
6808
+ return false;
6809
+ let diff = 0;
6810
+ for (let i = 0; i < a.length; i++)
6811
+ diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
6812
+ return diff === 0;
6813
+ };
6814
+
6804
6815
  // ../core/dist/surface.js
6805
6816
  var defineMock = (runtime) => runtime;
6806
6817
  var ADMIN_ROUTE_REFERENCE = {
@@ -6919,6 +6930,10 @@ var assertAdminPrefixAvailable = (prefix, paths) => {
6919
6930
  }
6920
6931
  };
6921
6932
  var ADMIN_KEY_HEADER = CONTROL_HEADERS.adminKey;
6933
+ var hasAdminKey = (headers, adminKey) => {
6934
+ const sent = headers.get(ADMIN_KEY_HEADER);
6935
+ return sent !== null && timingSafeEqual(sent, adminKey);
6936
+ };
6922
6937
  var NAMESPACE_HEADER = CONTROL_HEADERS.namespace;
6923
6938
  var ADMIN_DOCS_URL = "https://mockingbird.chrisvouga.dev/docs/admin-controls";
6924
6939
  var ADMIN_CONTROL_PAGES = [
@@ -7392,7 +7407,7 @@ var createControlPlane = (context) => {
7392
7407
  }
7393
7408
  const path = url.pathname.slice(adminPrefix.length) || "/";
7394
7409
  const shell = request.method === "GET" && (path === "/ui" || path === "/ui/");
7395
- if (!shell && context.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== context.adminKey) {
7410
+ if (!shell && context.adminKey !== void 0 && !hasAdminKey(request.headers, context.adminKey)) {
7396
7411
  return adminError(401, `missing or wrong ${ADMIN_KEY_HEADER}`);
7397
7412
  }
7398
7413
  for (const route of routes) {
@@ -8155,7 +8170,7 @@ var stateAdminRoutes = (routes) => {
8155
8170
  };
8156
8171
 
8157
8172
  // ../core/dist/version.js
8158
- var PACKAGE_VERSION = true ? "1.10.4" : UNRELEASED_VERSION;
8173
+ var PACKAGE_VERSION = true ? "1.10.6" : UNRELEASED_VERSION;
8159
8174
 
8160
8175
  // ../core/dist/webhooks.js
8161
8176
  var json4 = (status, body) => new Response(JSON.stringify(body), {
@@ -9134,7 +9149,7 @@ var createRuntime = (options) => {
9134
9149
  throw error;
9135
9150
  }
9136
9151
  const rewinds = at !== void 0 && selectedBranch === "main" && MUTATING_METHODS.has(request.method);
9137
- if ((requested || rewinds) && options.adminKey !== void 0 && request.headers.get(ADMIN_KEY_HEADER) !== options.adminKey)
9152
+ if ((requested || rewinds) && options.adminKey !== void 0 && !hasAdminKey(request.headers, options.adminKey))
9138
9153
  return refuse(401, `control headers need ${ADMIN_KEY_HEADER}`);
9139
9154
  controls.ensure(namespace);
9140
9155
  if (requested?.restore !== void 0 && !snapshotStore.get(namespace, requested.restore))
@@ -9537,4 +9552,4 @@ export {
9537
9552
  createRuntime2 as createRuntime,
9538
9553
  ResourceGroupsTaggingApiAPI
9539
9554
  };
9540
- //# sourceMappingURL=chunk-ZULXLI4E.js.map
9555
+ //# sourceMappingURL=chunk-HH4JDVOT.js.map