# Harden attachment ID resolution and missing-file handling · screen/t3code-personal

[View on GitCafe](https://git.cafe/screen/t3code-personal/commit/70c9147c7fa86ada23c55fa17b3a63f6a832f5f4)

Repository: [screen/t3code-personal](https://git.cafe/screen/t3code-personal)

Visibility: public

Requested revision: 70c9147c7fa86ada23c55fa17b3a63f6a832f5f4

Requested commit: 70c9147c7fa86ada23c55fa17b3a63f6a832f5f4

Commit: 70c9147c7fa86ada23c55fa17b3a63f6a832f5f4

Tree: 527e9c4750dddece094f02165ce15e3992c671b4

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Harden attachment ID resolution and missing-file handling

- Sanitize thread-derived attachment ID segments to safe, bounded tokens
- Resolve attachment IDs only when a matching file exists on disk
- Return 404 (not 400) for missing attachment IDs in the attachment route
- Add attachmentStore tests for ID sanitization and extension-based path lookup

```

## Parents

- [c0054cb56f1439c7bfda7771f919bdb7f948bab7](https://git.cafe/screen/t3code-personal/commit/c0054cb56f1439c7bfda7771f919bdb7f948bab7?format=markdown)

[Source at this commit](https://git.cafe/screen/t3code-personal/tree/70c9147c7fa86ada23c55fa17b3a63f6a832f5f4?format=markdown)
