Repository navigation
Validate X-Forwarded-Host against allowedDomains when resolving clientAddress - #17208
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: e98ec85 The changes in this PR will be included in the next version bump. This PR includes changesets to release 392 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
ematipico
approved these changes
Jun 26, 2026
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Jul 4, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.0.3` → `7.0.4`](https://renovatebot.com/diffs/npm/astro/7.0.3/7.0.4) |  |  | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v7.0.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#704) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@7.0.4) ##### Patch Changes - [#​17212](withastro/astro#17212) [`7ba0bb1`](withastro/astro@7ba0bb1) Thanks [@​matthewp](https://github.com/matthewp)! - Ensures transition directive values are HTML-escaped when rendered on hydrated islands - [#​17224](withastro/astro#17224) [`dc5e52f`](withastro/astro@dc5e52f) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes trailing slash handling for dynamic file endpoints in dev mode. Dynamic file endpoints (e.g., `src/pages/api/[name].json.ts`) with `trailingSlash: "always"` incorrectly required a trailing slash in dev mode, returning 404 for `/api/bar.json` and 200 for `/api/bar.json/`. - [#​17067](withastro/astro#17067) [`23f9446`](withastro/astro@23f9446) Thanks [@​fkatsuhiro](https://github.com/fkatsuhiro)! - Fixed a bug where the development toolbar did not output a warning even though the implicit ARIA role and the manually specified role were duplicated. - [#​17234](withastro/astro#17234) [`d5fbee8`](withastro/astro@d5fbee8) Thanks [@​ocavue](https://github.com/ocavue)! - Adds support for [`sharp` v0.35](https://github.com/lovell/sharp/releases/tag/v0.35.0). pnpm users no longer need to approve `sharp`'s build script (see [`allowBuilds`](https://pnpm.io/settings#allowbuilds)) when on v0.35. - [#​17223](withastro/astro#17223) [`5970ef4`](withastro/astro@5970ef4) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes `getCollection()` returning empty in dev mode for large content collections (500k+ entries) - [#​17184](withastro/astro#17184) [`799e5cd`](withastro/astro@799e5cd) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Upgrades the Rust compiler to the latest, which fixes some bugs. Refer to its [changelog](https://github.com/withastro/compiler-rs/releases/tag/%40astrojs%2Fcompiler-rs%400.3.0) for more information. - [#​17208](withastro/astro#17208) [`da8b573`](withastro/astro@da8b573) Thanks [@​matthewp](https://github.com/matthewp)! - Hardens forwarded header handling so the internal request helper validates `X-Forwarded-Host` against `security.allowedDomains` before trusting `X-Forwarded-For` for `clientAddress`. Previously it only checked that the header was present, which was inconsistent with the public `createRequest` helper. This aligns both code paths; behavior is unchanged for correctly configured proxies. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDYuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI0Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
createRequestFromNodeRequesthelper with the publiccreateRequest:X-Forwarded-Foris only trusted forclientAddresswhenX-Forwarded-Hostactually matchessecurity.allowedDomains, instead of just checking that the header is present.Testing
createRequestFromNodeRequesttest block covering: trustedHost, trustedX-Forwarded-Host, a non-matchingX-Forwarded-Host(now falls back to the socket address), and the no-allowedDomainscase.Docs
allowedDomainsbehavior is unchanged from a user's perspective.