FA-76450 / Email MIME structure / Member archive
Resolve and de-duplicate attachment file names: dot name rejection · case 05
A filename of ".." or "." is accepted and later resolves to a directory.
Case contract
Each part has optional fstar (already decoded filename*), fname (filename) and ctname (Content-Type name) and a type. Precedence is fstar, fname, ctname. Directory components are removed (both "/" and "\" separate). An empty name, "." or ".." becomes "attachment" plus an extension by type (.pdf, .png, .txt, else .bin). Names are de-duplicated case-insensitively: the k-th copy gets " (k)" before the last extension, or at the end when there is no extension or the name starts with its only dot.
Why this case matters
Attachment names end up on disk; wrong names overwrite files, leak paths or confuse users.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| dot names | ["..", "."] | ["attachment.png", "attachment.txt"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗