https://gitlab.synchro.net/main/sbbs/-/commit/0ca5676148730160b440cf02
Modified Files:
src/sbbs3/websrvr.cpp
Log Message:
websrvr: always read the file header when resolving a file-vpath request
4de1032086 (payroll-20-queue, 2026-08-01) skipped the header record for
a file in a free directory, on the grounds that loadfile() zeroes the
cost there and download_is_free() short-circuits on the same flag before
any credit comparison.
The cost is not the only field that comes from the header. The index
record stores the filename truncated to SMB_FILEIDX_NAMELEN (64 bytes, extension preserved), and smb_getfile() points file.name at it, so at
index detail file.name was that truncated form. Names longer than the
limit are not hypothetical: one in this file base is 78 characters. The
name reaches user_downloaded_file(), which embeds it in the uploader's
"file downloaded" notification, and mqtt_file_download(), which
publishes it.
The transfer and the credit accounting survived it, because deriving an
index name from an already-truncated one is idempotent and the record
still resolved, but the name recorded and announced was wrong.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)