549 Commits

Author SHA1 Message Date
renovate[bot]
4db790233e fix(deps): update astro adapters (#14880)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 14:53:07 +01:00
Houston (Bot)
7a07f0244c [ci] release (#14788)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-17 14:26:07 -05:00
Matthew Phillips
dafbb1ba29 Prevent cache poisoning in x-forwarded headers (#14743)
* Restrict X-Forwarded-Proto and X-Forwarded-Port

* Fix X-Forwarded header security vulnerabilities

- Sanitize hostnames to reject paths and prevent path injection
- Validate X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port headers
- Add strict rejection for invalid hostnames (those with path separators)
- Implement single sanitizeHost() function in App class, used by both validateForwardedHeaders() and node.ts
- Add comprehensive security tests for header validation

* Fix path injection and port matching bugs in header validation

- Reject both forward and backward slashes in hostnames using single regex
- Fix allowedDomains port matching by validating full hostname:port combo instead of just hostname
- Add test for X-Forwarded-Host with embedded port in allowedDomains pattern

* changeset and build

* fix: validate X-Forwarded headers with port pattern matching

Fixes protocol validation to accept http/https when allowedDomains exist but lack protocol patterns. Restructures port/host validation to validate port first, then include it when validating host against patterns. Properly extracts hostname without port to avoid duplication when combining with X-Forwarded-Port.

* Update .changeset/secure-headers.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2025-11-10 15:18:23 -05:00
renovate[bot]
dae9d3f683 fix(deps): update astro adapters (#14708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 10:12:18 +01:00
renovate[bot]
eaf47d5df5 fix(deps): update astro adapters (#14579)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 09:33:15 +02:00
Emanuele Stoppa
adaaced471 chore: bump biome and errors (#14539)
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
2025-10-14 15:57:37 +01:00
Houston (Bot)
ef7af66097 [ci] release (#14527)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-14 15:08:21 +02:00
Xidorn Quan
9e16dc2c21 [ci] format 2025-10-14 06:55:43 +00:00
Xidorn Quan
62ec8ea14a feat(node): handle redirects dynamically in static mode (#14441)
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
2025-10-14 08:54:49 +02:00
Houston (Bot)
3412859d37 [ci] release (#14510)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-10 10:54:01 -04:00
Matthew Phillips
66a26d7060 Fix compatibility with older Astro versions in @astrojs/node (#14514)
- Make getAllowedDomains() call optional with fallback to empty array
- Update peer dependency to require astro@^5.14.3
- Fixes #14513
2025-10-10 09:49:54 -04:00
Houston (Bot)
3bb14b7dbb [ci] release (#14466)
* [ci] release

* Skip yarn test that fails with unpublished dependencies

The yarn test packs astro and attempts to install it, which fails when
workspace dependencies like @astrojs/internal-helpers have been bumped
but not yet published to npm. Skip this test to allow the release to proceed.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2025-10-08 14:51:14 -04:00
Matthew Phillips
ec307b02e3 [ci] format 2025-10-08 12:57:53 +00:00
Matthew Phillips
6ee63bfac4 Merge commit from fork
* fix(security): require allowedDomains config for X-Forwarded-Host validation

Fixes X-Forwarded-Host header injection vulnerability by requiring explicit
allowedDomains configuration. When not configured, X-Forwarded-Host headers
are ignored to prevent manipulation of Astro.url by malicious requests.

- Add security.allowedDomains configuration using RemotePattern format
- Validate X-Forwarded-Host against allowedDomains patterns in both App and NodeApp
- Ignore untrusted headers when no allowedDomains configured (secure by default)
- Update tests to verify security behavior with and without configuration

* Address PR review feedback on allowedDomains implementation

- Remove pathname field from allowedDomains schema (not applicable to host headers)
- Clarify documentation that protocol, hostname, and port are all validated if provided
- Add test demonstrating port validation behavior when port not specified in pattern

* add changeset

* make it a patch

* explain the breaking change

* Update secure-forwarded-host-validation.md
2025-10-08 08:57:16 -04:00
Matt Kane
91190b828f chore: fixes from merged PR (#14482)
* Format

* Remove unused export
2025-10-02 17:29:37 +01:00
Matt Kane
b8ca69b971 Merge commit from fork
* fix: refactor image source loading

* Split entrypoints

* Add more tests
2025-10-02 16:58:21 +01:00
Houston (Bot)
29ff12f205 [ci] release (#14416)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-22 09:55:20 +01:00
Roman
a6c750c07b bump devalue (#14346)
* bump devalue

https://github.com/withastro/astro/pull/14272

* should work now
2025-09-14 07:46:37 +01:00
Florian Lefebvre
17c7b0395c feat: update sharp (#14335) 2025-09-09 13:53:52 +02:00
renovate[bot]
ae8f29df47 fix(deps): update astro adapters (#13854)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2025-09-03 13:48:39 +02:00
Houston (Bot)
d471be562f [ci] release (#14242)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-22 18:33:25 +02:00
Chris Swithinbank
77b18fb1f8 Update Astro peer dependency in adapters with auto-enabled sessions (#14240)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2025-08-18 18:31:49 +02:00
Houston (Bot)
92881331d1 [ci] release (#14232)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-15 15:21:32 +01:00
Houston (Bot)
a186848c34 [ci] release (#14217)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-14 11:18:36 +01:00
Emanuele Stoppa
d55b88a678 [ci] format 2025-08-14 08:04:32 +00:00
Emanuele Stoppa
5fc3c599ca Merge commit from fork
* fix(node): take internal paths into consideration

* chore: address feedback

* Update packages/integrations/node/test/trailing-slash.test.js

Co-authored-by: Luiz Ferraz <luiz@lferraz.com>

* Update .changeset/lemon-wombats-bathe.md

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* added additional tests

* use concrete examples

---------

Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2025-08-14 09:03:49 +01:00
Houston (Bot)
dc9e35ccd6 [ci] release (#14189)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-08 16:04:18 +01:00
Matt Kane
56a05aaaa5 [ci] format 2025-08-08 14:57:47 +00:00
Matt Kane
e3422aa423 feat: add support for specifying a prerendered error page host (#14188)
* feat: add support for specifying a prerendered error page host

* Remove console

* Validate config

* Update test

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>

* Clean up test better

* Move into separate fixture

* Check protocol

* Lock

---------

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
2025-08-08 15:57:07 +01:00
Houston (Bot)
0f0a4c44af [ci] release (#14172)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-01 15:43:53 +01:00
Houston (Bot)
5eaf5246f7 [ci] release (#14171)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-31 19:10:56 +01:00
Houston (Bot)
09b533b945 [ci] release (#14149)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-29 14:38:14 +01:00
ColoredCarrot
e4d74bac7f fix(node): emit set-cookie header from middlewares for not-found routes (#14136) (#14148) 2025-07-28 12:23:54 +01:00
Emanuele Stoppa
9cfccc7b9e [ci] format 2025-07-24 11:32:02 +00:00
Houston (Bot)
88b54d3cba [ci] release (#14033)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-03 12:11:43 +01:00
Florian Lefebvre
a125a14c51 feat(node): experimentalDisableStreaming (#14012)
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>


Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
Co-authored-by: sarah11918 <5098874+sarah11918@users.noreply.github.com>
2025-07-02 15:01:02 +01:00
Emanuele Stoppa
98853ce7e3 [ci] format 2025-07-02 10:42:45 +00:00
Emanuele Stoppa
db8f8becc9 feat(node): experimental static headers (#13972)
Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>


Co-authored-by: florian-lefebvre <69633530+florian-lefebvre@users.noreply.github.com>
Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com>
Co-authored-by: sarah11918 <5098874+sarah11918@users.noreply.github.com>
2025-07-02 11:42:02 +01:00
Emanuele Stoppa
33f2d157e3 chore: upgrade to Biome v2 (#13984) 2025-06-27 13:01:18 +01:00
Houston (Bot)
425f8d0ab1 [ci] release (#13804)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-21 16:57:44 +01:00
JP Wienekus
c5860b501a [ci] format 2025-05-21 14:43:57 +00:00
Reuben Tier
660e83fddf Handle module not found errors in server entrypoint (#13507)
* Handle module not found errors in server entrypoint

* Save my files -_-
2025-05-21 15:41:20 +01:00
renovate[bot]
b8f843a004 fix(deps): update astro adapters (#13662)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 06:48:20 +01:00
Houston (Bot)
64898a3e3b [ci] release (#13667)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-23 11:03:28 +02:00
Florian Lefebvre
5dd2d3fde8 chore: clean dead code (#13591) 2025-04-22 18:10:07 +02:00
Chris Swithinbank
555935bbf4 Fix changelog heading levels (#13619) 2025-04-15 13:45:52 +02:00
Houston (Bot)
59af0cbd0a [ci] release (#13610)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-15 10:36:51 +01:00
Matt Kane
2fd6a6b7aa feat: stable sessions (#13527)
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>


Co-authored-by: florian-lefebvre <69633530+florian-lefebvre@users.noreply.github.com>
Co-authored-by: sarah11918 <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: ematipico <602478+ematipico@users.noreply.github.com>
2025-04-14 10:01:09 +01:00
Houston (Bot)
10fae31ac1 [ci] release (#13361)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-11 09:23:12 +00:00
Emanuele Stoppa
e8c26d5bdb ci: add new command for vite ecosystem CI (#13357) 2025-03-04 11:48:59 +00:00