# fix\(server\): refuse symlinked theme files on Windows too · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/ad9b7df33d4e7ac221ddc39f20377f7d68825b16)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: ad9b7df33d4e7ac221ddc39f20377f7d68825b16

Requested commit: ad9b7df33d4e7ac221ddc39f20377f7d68825b16

Commit: ad9b7df33d4e7ac221ddc39f20377f7d68825b16

Tree: 24df483752ab90091e15a8e024ce2bcf5754ce17

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(server): refuse symlinked theme files on Windows too

readThemeFileGuarded relied on O_NOFOLLOW to reject a symlinked theme file.
Windows has no such flag: the constant is undefined, OR-ing it in is a
no-op, and the open followed the link, so a symlink planted in the themes
directory published whatever it pointed at. Check with lstat first where
the flag is missing; the descriptor-bound checks after the open still
narrow what a swap in that window can reach.

Co-Authored-By: Claude Code <noreply@anthropic.com>

```

## Parents

- [3bcea0a97064d223537fb84e50f6f67a7c7b8869](https://git.cafe/pingdotgg/t3code/commit/3bcea0a97064d223537fb84e50f6f67a7c7b8869?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/ad9b7df33d4e7ac221ddc39f20377f7d68825b16?format=markdown)
