Files
Bjørn Erik PedersenandClaude Fable 5.1 41040cc7b1 tocss: Confine Sass import fallbacks to the allowed read paths
Imports not found in Hugo's file systems were resolved by the Sass compiler
itself, with the real mount directories as include paths. The compiler follows
symlinks and knows nothing about the project root, so a theme could import
../secret, an absolute path, or a symlink it ships, and get the file content
into the published CSS.

Resolve these imports in Hugo instead, checked against the same allowRead roots
as the Node.js tools and js.Build. Dart Sass gets no load paths anymore; for
LibSASS a rejected path is returned as an @error body.

Thanks to @Hama1cco for finding and reporting this issue.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 16:13:46 +02:00
..
…
…