Skip to content

Commit

Permalink
[ci] release (#12648)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
astrobot-houston and github-actions[bot] authored Dec 5, 2024
1 parent e7d14c3 commit ba4aac1
Show file tree
Hide file tree
Showing 30 changed files with 65 additions and 61 deletions.
5 changes: 0 additions & 5 deletions .changeset/swift-pandas-serve.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^3.1.9",
"@astrojs/rss": "^4.0.9",
"@astrojs/sitemap": "^3.2.1",
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.16.16"
"astro": "^4.16.17"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^4.16.16",
"astro": "^4.16.17",
"@astrojs/react": "^3.6.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.14.3",
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^4.3.0",
"@webcomponents/template-shadowroot": "^0.2.1",
"astro": "^4.16.16",
"astro": "^4.16.17",
"lit": "^3.2.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@astrojs/vue": "^4.5.3",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^4.16.16",
"astro": "^4.16.17",
"preact": "^10.25.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.4",
"@preact/signals": "^1.3.0",
"astro": "^4.16.16",
"astro": "^4.16.17",
"preact": "^10.25.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.3",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^4.16.16",
"astro": "^4.16.17",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.4",
"astro": "^4.16.16",
"astro": "^4.16.17",
"solid-js": "^1.9.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^6.0.2",
"astro": "^4.16.16",
"astro": "^4.16.17",
"svelte": "^5.2.9"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^4.5.3",
"astro": "^4.16.16",
"astro": "^4.16.17",
"vue": "^3.5.13"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^8.3.4",
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^4.16.16"
"astro": "^4.16.17"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^8.3.4",
"@astrojs/svelte": "^6.0.2",
"astro": "^4.16.16",
"astro": "^4.16.17",
"svelte": "^5.2.9"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^4.16.16",
"astro": "^4.16.17",
"sass": "^1.81.0",
"sharp": "^0.33.3"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^4.16.16",
"astro": "^4.16.17",
"@types/node": "^18.17.8"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^0.11.5",
"astro": "^4.16.16"
"astro": "^4.16.17"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "^3.1.9",
"@astrojs/preact": "^3.5.4",
"astro": "^4.16.16",
"astro": "^4.16.17",
"preact": "^10.25.0"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.4",
"@nanostores/preact": "^0.5.2",
"astro": "^4.16.16",
"astro": "^4.16.17",
"nanostores": "^0.11.3",
"preact": "^10.25.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/mdx": "^3.1.9",
"@astrojs/tailwind": "^5.1.2",
"@types/canvas-confetti": "^1.6.4",
"astro": "^4.16.16",
"astro": "^4.16.17",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.49",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^4.16.16",
"astro": "^4.16.17",
"vitest": "^2.1.6"
}
}
6 changes: 6 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# astro

## 4.16.17

### Patch Changes

- [#12632](https://github.com/withastro/astro/pull/12632) [`e7d14c3`](https://github.com/withastro/astro/commit/e7d14c374b9d45e27089994a4eb72186d05514de) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the `checkOrigin` feature wasn't correctly checking the `content-type` header

## 4.16.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "4.16.16",
"version": "4.16.17",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/src/core/app/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FORM_CONTENT_TYPES = [
export function createOriginCheckMiddleware(): MiddlewareHandler {
return defineMiddleware((context, next) => {
const { request, url } = context;
if (request.method === "GET") {
if (request.method === 'GET') {
return next();
}
const sameOrigin =
Expand All @@ -30,8 +30,8 @@ export function createOriginCheckMiddleware(): MiddlewareHandler {
request.method === 'PATCH' ||
request.method === 'DELETE') &&
request.headers.get('origin') === url.origin;
const hasContentType = request.headers.has('content-type')

const hasContentType = request.headers.has('content-type');
if (hasContentType) {
const formLikeHeader = hasFormLikeHeader(request.headers.get('content-type'));
if (formLikeHeader && !sameOrigin) {
Expand All @@ -47,7 +47,7 @@ export function createOriginCheckMiddleware(): MiddlewareHandler {
}
}

return next()
return next();
});
}

Expand Down
9 changes: 6 additions & 3 deletions packages/astro/test/csrf-protection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,20 @@ describe('CSRF origin check', () => {
assert.equal(response.status, 403);

request = new Request('http://example.com/api/', {
headers: { origin: 'http://loreum.com', 'content-type': 'application/x-www-form-urlencoded; some-other-value' },
headers: {
origin: 'http://loreum.com',
'content-type': 'application/x-www-form-urlencoded; some-other-value',
},
method: 'POST',
});
response = await app.render(request);
assert.equal(response.status, 403);

request = new Request('http://example.com/api/', {
headers: { origin: 'http://loreum.com', },
headers: { origin: 'http://loreum.com' },
method: 'POST',
credentials: 'include',
body: new Blob(["a=b"],{})
body: new Blob(['a=b'], {}),
});
response = await app.render(request);
assert.equal(response.status, 403);
Expand Down
Loading

0 comments on commit ba4aac1

Please sign in to comment.