# Use an image id as a file name only when it is a safe image file name · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/0d554a0837fadfa7a550bbe451358d2a20581beb)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 0d554a0837fadfa7a550bbe451358d2a20581beb

Requested commit: 0d554a0837fadfa7a550bbe451358d2a20581beb

Commit: 0d554a0837fadfa7a550bbe451358d2a20581beb

Tree: ae74067abe15262346920ea48d3ce84c31267fa8

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Use an image id as a file name only when it is a safe image file name

The app saves a strategy's images as <strategy id>/images/<id><extension>,
and both parts can come from an imported file or from the cloud. One rule,
the same one the server keeps since #356, now decides every name: no
separators, drive colons, "..", characters Windows refuses or a trailing
dot or space, and an image extension. The path builders refuse anything
else; lookups treat it as a file that isn't on this device.

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

```

## Parents

- [c2ddf79d7f5d83519e098e151021acdf34a9c04b](https://git.cafe/dara/icarus/commit/c2ddf79d7f5d83519e098e151021acdf34a9c04b?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/0d554a0837fadfa7a550bbe451358d2a20581beb?format=markdown)
