Skip to content

Commit a358ea6

Browse files
authored
Merge pull request #44 from mit-acl/fix-astro-sharp-rce
Upgrade Astro to 7.3.5 to fix Sharp/libheif RCE advisory
2 parents c2d0b41 + 9b8a803 commit a358ea6

7 files changed

Lines changed: 2551 additions & 932 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- uses: actions/setup-node@v4
2929
with:
30-
node-version: 20
30+
node-version: 22
3131
cache: npm
3232

3333
- run: npm ci

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Single image used for both local dev (astro dev) and producing the static
22
# build (astro build). Node lives only in here — the host needs just Docker.
3-
FROM node:20-alpine
3+
FROM node:22-alpine
44

55
WORKDIR /app
66

‎astro.config.mjs‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
3+
import { unified } from '@astrojs/markdown-remark';
34
import remarkSmartypants from 'remark-smartypants';
45
import remarkImageParagraphs from './src/lib/remark-image-paragraphs.ts';
56
import remarkReferences from './src/lib/remark-references.ts';
@@ -9,6 +10,9 @@ import remarkReferences from './src/lib/remark-references.ts';
910
export default defineConfig({
1011
site: 'https://acl.mit.edu',
1112
trailingSlash: 'ignore',
13+
// Astro 7 defaults to JSX whitespace rules, which drop the spaces between
14+
// inline elements that the templates rely on; keep the lossless compression.
15+
compressHTML: true,
1216
build: {
1317
// Keep the old site's URLs: `people/index.astro` -> /people/index.html,
1418
// `people/[kerberos].astro` -> /people/<kerberos>.html (served at /people/<kerberos>).
@@ -17,8 +21,10 @@ export default defineConfig({
1721
markdown: {
1822
// Typographic quotes and dashes as on the old (kramdown) site: `--` is an
1923
// en dash, `---` an em dash.
20-
smartypants: false,
21-
remarkPlugins: [[/** @type {any} */ (remarkSmartypants), { dashes: 'oldschool' }], remarkReferences, remarkImageParagraphs],
24+
processor: unified({
25+
smartypants: false,
26+
remarkPlugins: [[/** @type {any} */ (remarkSmartypants), { dashes: 'oldschool' }], remarkReferences, remarkImageParagraphs],
27+
}),
2228
syntaxHighlight: 'shiki',
2329
shikiConfig: { theme: 'github-light' },
2430
},

0 commit comments

Comments
 (0)