Potential null reference if mainHostDestinationCalendar is undefined if evt.destinationCalendar is null or an empty array
Logic inversion in organization creation: The slug property is now conditionally set when IS_TEAM_BILLING_ENABLED is true, instead of when it's false as originally intended. This change, combined with requestedSlug still being set when IS_TEAM_BILLING_ENABLED is true, results in both properties being set when billing is enabled, and neither when disabled
At handleNewBooking.ts:1063-1067 evt.destinationCalendar is set to null when neither eventType nor organizerUser has a destinationCalendar, so the COLLECTIVE branch's `evt.destinationCalendar?.push(...teamDestinationCalendars)` (line 1078) short-circuits to a no-op, silently discarding all team members' destinationCalendars and producing no calendar events for them.
EventManager.ts:170 now writes credentialId: undefined for video booking references (was result.credentialId from videoClient.ts:78), so handleCancelBooking.ts:491's `if (bookingVideoReference.credentialId)` guard is always false and the external video meeting is never deleted on cancellation.
The new line `if (response.statusText !== "OK")` in salesforce CalendarService.getClient checks statusText, but Node's global fetch (undici) returns an empty statusText for HTTP/2 responses served by login.salesforce.com, so a successful 200 yields `"" !== "OK"` and throws HttpError on every Salesforce client construction.
The deleteMany OR-arm `retryCount: { gt: 1 }` has no method or scheduledDate filter, so an SMS reminder retried more than once is deleted even when its scheduled date is still in the future, prematurely removing pending reminders.
scheduleSMS returns undefined on SMS-lock and throws on rate-limit/missing-creds; both paths increment retryCount, and the new deleteMany OR clause (retryCount > 1, with no method/date filter) permanently deletes those reminders after a few cron runs, so transient locks, monthly rate-limits, or a temporary Twilio misconfiguration silently drop reminders that previously stayed scheduled=false and were retried until scheduledDate.
The new migration inserts each newline-split token of the old `embeddable_hosts` site-setting value directly into a raw SQL string: `execute "INSERT INTO embeddable_hosts (host, category_id, created_at, updated_at) VALUES ('#{h}', #{category_id}, ...)"`. `h` is unsanitized admin-controlled free text (the setting had no hostname validation); a value containing a single quote (an accidental typo or a deliberate payload) produces malformed SQL or executes arbitrary statements. Migrations run with DDL-capable database credentials, so the blast radius is large.
TopicRetriever fetches the embed/feed URL with `open(url).read` (Readability) and `open(SiteSetting.feed_polling_url)`. The only guard is `invalid_host?`, which pins the initial referer/embeddable_host; open-uri transparently follows HTTP redirects, so a whitelisted host returning a 3xx to an internal address (link-local 169.254.169.254, a private IP, or a localhost admin port) reaches it. This is a redirect-based SSRF that the host whitelist does not cover.
The TopicEmbed.import method is susceptible to a NoMethodError if the contents parameter is nil when attempting to append a string, and an XSS vulnerability due to unescaped url interpolation in the generated HTML.
poll_feed.rb passes raw third-party feed HTML to TopicEmbed.import with cook_method raw_html, which post.rb's cook() returns verbatim without sanitization (unlike import_remote's Readability whitelist), and best.html.erb renders it via `raw post.cooked` on a Discourse-origin page with X-Frame-Options ALLOWALL — yielding stored XSS from `<script>` in a feed item.
The change narrows shouldShowSyncColumns() with `&& conn.supportsColumnSelection`, which is correct for the column-selection control. But the unchanged consumer wizard.ts uses that same gate to show the sync-method and primary-key controls too. For any connector that does not support column selection, those two controls now silently disappear, so the user can no longer choose incremental vs full-refresh sync. The fix is a separate gate for column selection.
The change adds the assertSameEnv() environment-scoping guard to the create() and update() mutations, but the sibling remove() on the same controller is left unguarded. An API key scoped to one environment can therefore delete an integration in another environment of the same org (a cross-environment IDOR). The vulnerable line is the unchanged remove(): the diff shows the guard being added to its siblings, not to it.
In listWithTeamHandler (packages/trpc/server/routers/viewer/eventTypes/listWithTeam.handler.ts), this PR adds `AND "public"."EventType"."teamId" IS NULL` to the WHERE clause of Part 1 of the raw SQL UNION query. Part 1 previously returned every EventType owned by the current user (`userId = currentUser`); the new condition restricts it to non-team event types only. Team event types are then expected to come from Part 2, which discovers them via an INNER JOIN on Membership. But a team event type whose `userId` is set to the current user while that user has no Membership row for the team falls through both branches: Part 1 excludes it (teamId is not null) and Part 2 excludes it (no Membership). The result is that such owned team event types silently disappear from the listing, breaking the event-types view for owners-without-membership.
In useBookings, this PR renames the instant-booking query parameter from bookingId (a number) to bookingUid (a string), but the getInstantBookingLocation query is still gated only on `enabled: !!bookingUid` with no isInstantMeeting guard. A non-instant "additional seats" booking flow carries a bookingUid in the URL (Booker store setSeatedEventData), so the query now fires for it; when the existing booking's metadata has a videoCallUrl, RedirectToInstantMeetingModal pushes the booker to that video page, and otherwise an error toast shows. Either way the seat cannot be booked. Before the rename the value was read as `parseInt(getQueryParam("bookingId") ?? "0")`, which was 0 (falsy, query disabled) on those URLs, so the rename is what newly triggers the path. The fix gates both the query and the redirect effect on isInstantMeeting.
sameElidedPrefix(newSpan.Key, lastFile.Span.EndKey, ...) is structurally always true in the contiguous-extend path, since isContiguousSpan requires newSpan.Key == lastFile.Span.EndKey by definition -- comparing ElidedPrefix(X) to itself. The guard therefore cannot fire on the exact path it exists to protect: extending a manifest file across a contiguous span whose elided prefix differs from s.elidedPrefix silently mislabels the entry's key-strip prefix, corrupting restore for ordinary backup shapes (a table's span ending where the next table's begins). Distinct from d1 -- same function, different mechanism. The sibling file_sst_sink.go compares spanPrefix against s.elidedPrefix directly and does not have this bug.
getDeleter re-acquires when `!timestamp.After(expiration)` (timestamp <= expiration), which is the lease's valid range, so it re-leases every call while valid and reuses the expired descriptor (setting a past UpdateDeadline) once timestamp > expiration — inverted relative to hasExpired's `expiration.LessEq(timestamp)`.
`updateTombstone` guards with `if err != nil && isLwwLoser(err)` and then re-tests `if isLwwLoser(err)` inside that branch, which is always true, making the `return batchStats{}, err` arm unreachable. The consequence is the fall-through: any genuine error (addToBatch failure, `txn.KV().Run` failure, a lease error) fails the outer condition and reaches `return batchStats{}, nil`, reporting success on a failed tombstone update.
The refactor moved the interval guard into canSave as `if interval <= 0 { return false }`, but min_checkpoint_frequency=0 is a valid setting meaning 'save as often as possible.' `<= 0` folds the zero case into the disabled case, so the changefeed highwater never advances and resolved timestamps are never emitted. The fix is `<= 0` -> `< 0`.
In the new Index.check() (django/db/models/indexes.py), the local-field validation passes the raw self.fields set to model._check_local_fields: "{*self.fields, *self.include, *references}". self.fields keeps the leading "-" descending-ordering prefix, whereas the old Model._check_indexes built the field list from index.fields_orders (which strips the prefix). So an index declared with a descending field, e.g. Index(fields=["-author"]), is looked up as "-author", fails to match the real "author" field, and raises a spurious models.E012 ("indexes refers to the nonexistent field -author") on a perfectly valid model.
This PR renames the private storage download/delete route from a single-segment [fileName] dynamic parameter to a catch-all [...filePath], specifically so it can also serve the newly introduced /storage/{workspaceId}/private/surveys/{surveyId}/elements/{elementId}/{file} scoped upload paths (per the PR's own description: "Scope new private upload URLs under .../surveys/{surveyId}/elements/{elementId}/..."). Both the nested route shape and the underlying storage key scheme for element-scoped uploads are new in this diff. Routing these newly introduced, more sensitive per-response upload files through the SAME entry point -- still gated only by the pre-existing, role-blind hasUserWorkspaceAccess (see d1) -- exposes them to billing-role users for the first time. This is a diff-attributable widening of exposure, distinct from d1's own (pre-existing, unchanged) check logic: unlike d1, this defect is genuinely introduced by the diff and should not be excluded from headline scoring.
All four write methods now hand the legacy write to a goroutine whose context descends from the request context (`context.WithTimeoutCause(ctx, ...)`). net/http cancels the request context as soon as the handler returns, and the goroutine starts microseconds before that, so the legacy write is aborted mid-flight on essentially every request and unified storage silently diverges from legacy storage.
The informer transform `trim` calls `accessor.SetManagedFields(nil)` unconditionally on every resync, mutating the object that lives in the shared informer cache. Because that cached object is read concurrently by other informer consumers, the unconditional in-place mutation is a data race that can panic kube-controller-manager / scheduler. The fix guards it (`if accessor.GetManagedFields() != nil`) so the transform is idempotent and does not rewrite shared state when already trimmed.
In `prepareResources`, the branch that handles an already-prepared claim (`if claimInfo.isPrepared()`) does `return nil` instead of `continue`. Because this runs inside the `for ... range pod.Spec.ResourceClaims` loop, the first already-prepared claim short-circuits the whole loop and the pod's remaining ResourceClaims are never prepared. The fix changes `return nil` back to `continue`.
The new pod index `AddPodControllerUIDIndexer` / `PodControllerUIDIndex` keys solely on the owning controllerRef's UID (`[]string{string(ref.UID)}`), ignoring namespace, kind, and name. Controllers (DaemonSet/ReplicaSet/Job/StatefulSet) that look pods up through this index can claim the wrong pods when a stale or duplicated ownerReference UID collides. The fix re-keys the index on the full (namespace, kind, name, uid) tuple.
Passing `nextConfig: __NEXT_HAS_REWRITES ? undefined : nextConfig` to getNextPathnameInfo was meant to preserve the locale prefix, but disabling the whole config also disables basePath stripping. The `/_next/data/<buildId>/...` prefix is never removed, and on a catch-all route the route regex overwrites router.query.<param> with the leftover data-URL segments, producing malformed URLs and 404s when basePath + rewrites + middleware + dynamic routes combine.
The response-handling refactor builds the /_next/data JSON page response as Buffer.from(JSON.stringify(result.value.pageData)). RenderResult.isDynamic decides static-vs-dynamic via `typeof this.response !== 'string'`, so a Buffer is misclassified as a dynamic stream; sendRenderResult then skips Content-Length and ETag and falls back to Transfer-Encoding: chunked, breaking CDN-side compression for self-hosted Pages Router deploys. The fix deletes the Buffer.from wrapper. (Large-diff stress case: ~3k lines, 22 files.)
In the app-route template's on-demand-revalidate path, responseGenerator correctly writes a real 404 response (res.statusCode = 404; res.end(...)) and returns null when isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry. Back in handleResponse, because this route is ISR-eligible (isIsr is true -- it's determined solely by prerender-manifest membership, independent of the on-demand-revalidate flags, and on-demand revalidation is inherently an ISR-only feature), the `if (!isIsr) return null` short-circuit is skipped, and cacheEntry?.value?.kind !== CachedRouteKind.APP_ROUTE (true, since cacheEntry is null) throws an "Invariant: app-route received invalid cache entry" error -- even though a valid 404 HTTP response was already sent to the client. Because isIsr is true, the surrounding catch re-throws this spurious error rather than swallowing it, propagating it up through base-server onto an already-ended response.
With `trailingSlash: true`, the new handler templates (app-page.ts, app-route.ts, pages.ts) take `resolvedPathname` from the request URL, which base-server now rebuilds from the raw `initURL` and which still ends in a slash. None of them calls `removeTrailingSlash`, which base-server applied before its cache-key and prerender lookups. The build writes prerender-manifest keys without the slash, so every lookup misses. For app-page, a prerendered page on a `dynamicParams = false` route is taken to be unlisted and throws NoFallbackError (404), and the ISR cache key becomes `/blog/a/`, so the prebuilt output is never served.
The re-implemented Server Action reducer now rejects the action's promise with a redirect error for every redirect, external ones included, where it previously resolved them, and builds that error's URL with createHrefFromUrl, which keeps only the path and query, so an external URL loses its origin. Called from a form action or useTransition, React catches the handled error and the external navigation that handleExternalUrl staged (mpaNavigation) goes through. Called outside a React scope, such as a plain onClick, the rejection reaches the app router's unhandledrejection handler, which pushes the same-origin path; that navigation supersedes the external one, so the redirect to the external URL never happens.
The PR added API-key environment scoping to only the create and update integration routes. The sibling mutations removeIntegration, setIntegrationAsPrimary, and autoConfigureIntegration on the same controller were left unscoped, so an API key from one environment can delete, re-prioritize, or auto-configure integrations in another environment of the same org (cross-environment IDOR).
The change narrows shouldShowSyncColumns with `&& selectedConnector.supportsColumnSelection`, correct for column-selection but the same flag also gates the Sync-method, Sync-field, and Primary-key columns. supportsColumnSelection is false for all non-SQL sources (Stripe, Hubspot, REST), so those three controls silently disappeared for every non-SQL source during table setup.
A new usage-report query runs raw `FROM logs` through sync_execute() on the logs cluster. HogQL resolves its `logs` table to the physical `logs_distributed` table, and production's logs cluster has no table named `logs`: the `logs` Distributed table that migration 0214 creates exists only in local and test schemas, which is why the PR's test passes. In production the query fails, and since the new query runs unconditionally it aborts the whole usage-report run that feeds billing (reverted the next day in #60611).
In `src/sentry/utils/samples.py`, `measurements.update(measurement_markers)` is placed INSIDE the `for key, entry in measurements.items()` loop, mutating the dict that is being iterated. Adding the new `mark.*` keys mid-iteration raises `RuntimeError: dictionary changed size during iteration`, breaking `load_data` for any transaction that carries measurements. The fix dedents the update to run once after the loop.
MetricAlertDetectorHandler inherits from StatefulDetectorHandler but only contains pass, failing to implement its required abstract methods: counter_names (property), get_dedupe_value(), get_group_key_values(), and build_occurrence_and_event_data(). This will cause a TypeError at runtime when the class is instantiated.
Because flusher processes are created via multiprocessing.get_context('spawn').Process, they are instances of multiprocessing.context.SpawnProcess, which on POSIX is not a subclass of multiprocessing.Process, so this isinstance check will always be false and hung processes won't be killed here.
In pkg/querier/postprocess.go the new prepareFillZeroArgsWithStep builds the fillZero function args as {req.Start, req.End, step} where step is computed in milliseconds (query.StepInterval.Duration.Milliseconds()) but req.Start/req.End are not guaranteed to be in milliseconds at runtime (callers may pass nanosecond-resolution timestamps). funcFillZero requires all three args in the same unit and loops from start to end by step appending one point per iteration; when start/end are nanoseconds and step is milliseconds the iteration count is ~10^6x too large, so the fill-zero path allocates an enormous slice of zero points and blows up memory / OOMs the query service.
The new eventDecoder builds each event's row from `getPhysicalColumnsSchema`, which drops every computed column, stored ones included. When the crud writer applies a replicated delete for a row the destination does not have, the table handler passes that row to `tombstoneUpdater.updateTombstone`. The tombstone updater's row.Deleter is built from `writeableColunms`, which keeps stored computed columns, and indexes the row by position. On a table with a stored computed column, every later column's datum is shifted. For example, on `(k INT PRIMARY KEY, c INT AS (k+1) STORED, v INT, INDEX (v))` the Deleter reads `v` at ordinal 2 of a 2-element row, and secondary-index encoding panics with index out of range. A stored computed column ahead of a primary-key column shifts the primary-key datum in the same way.