squid icon indicating copy to clipboard operation
squid copied to clipboard

FTP: Allow 0-byte file sizes and harden size parsing

Open MegaManSec opened this issue 4 months ago • 1 comments

Previously, we interpreted 213 SIZE by reading only the decimal prefix, parsing leading digits and ignoring any trailing text and accepted 0 to fix HEAD on empty files. If digits are missing, the value overflows, or is negative, we warn and mark the size unknown (-1).

MegaManSec avatar Sep 09 '25 22:09 MegaManSec

Cannot create a git commit message from PR title and description.

Error while parsing line 2: Invalid line 2 character (Unicode \u2014) at position 6:

Problematic parser input:

prefix\u2014parsing leading digits and ignoring any trailing text and

Please note that the text quoted above was modified from its original to replace bytes outside of ASCII space-tilde range with their Unicode code point sequences (i.e. \u00NN). Please see PR title and description formatting requirements for more details.

This message was added by Anubis bot. Anubis will add a new message if the error text changes. Anubis will remove M-failed-description label when there are no corresponding failures to report.

squid-anubis avatar Sep 09 '25 23:09 squid-anubis