Commit Graph
1 Commits
Author SHA1 Message Date
Lauri Ojansivu bdb3b15886 Serve attachments when the storage root is a symlink, and finish Bosnian.
FileStoreStrategyFilesystem builds its candidate paths by joining names onto
the storage root AS WRITTEN, then checked each one against that root with every
symlink RESOLVED. Those are the same string only when nothing in the path is a
symlink.

On macOS nothing is: os.tmpdir() is /var/folders/..., a symlink to
/private/var/folders/..., so every candidate failed containment before it was
looked at and getReadStream() returned undefined - WeKan serving none of its
own attachments. A deployment whose data directory is a symlink, which is an
ordinary arrangement, has the same fault on Linux. The mocha suite has been
reporting it all along as "allows reading a regular file from storage root",
which reads like a fussy assertion rather than like a platform that cannot open
attachments.

The lexical pre-filter now uses the root the candidates were built from. The
security property is untouched, because it was never that check which carried
it: what a caller must not do is reach a file OUTSIDE the root, and that is
decided by resolving the candidate and requiring the result to be inside the
resolved root. GHSA-4mxf-m8pq-xc9p's symlink escape and the plain absolute-path
escape are both still refused, and tests/fileStoreSymlinkRoot.test.cjs pins
that against a real symlinked root - including the exact comparison that caused
the bug.

Bosnian: 2175 untranslated strings to 1. Croatian and Serbian are complete and
Bosnian is the same Stokavian standard, so Croatian is the base, with the
documented Bosnian forms applied - sedmica for tjedan, nivo for razina, server
for posluzitelj, tok for tijek, hiljada for tisuca, historija for povijest, and
tacka/tacno for tocka/tocno. 29 strings needed one; the rest are identical in
both standards.

Two substitutions were REVERTED after reading the output, and that is the part
worth keeping: `poveznica` to `link` produced "iz ove linkove" and "iz bilo koje
linkove na kartu", because `poveznice` is both nominative plural and genitive
singular and one rule cannot be both. `poveznica` is good Bosnian, so it stays -
a correct word left alone beats a more idiomatic one put in the wrong case. The
same blindness left "Najviša nivo", feminine adjective on a masculine noun,
which is fixed by matching the whole phrase.

The last ten were translated directly. The one that remains is "Server", which
is spelled that way in Bosnian too - the tool counts a translation identical to
its source as missing, and that is the tool's limit, not a gap.

Thanks to xet7 !
2026-09-05 05:06:37 +03:00