OptionsMapper packs most boolean options into a single -… token, and the engine reads that token one character at a time. Several % options have a two-letter variant that consumes the next argv token: -%rf and -%rs for WARC, -%mu for sitemap-url, -%Zs for the single-file cap. When the character following one of those happens to be the variant letter, the engine takes it as the variant.
WARC is the only packed option with that shape today, and what saves it is CheckType, which always emits u<digit> between %r and FollowRobotsTxt's s<digit>. A profile that carries CheckType= empty, or out of range (getChildAt(5) returns null, the radio group ends up unchecked, the getter returns null), drops that separator. With WARC ticked the token becomes …X0%rs2%s…, the engine reads --warc-max-size, and it swallows the first crawl URL. strtoll rejects the URL so the cap keeps its default, and the crawl quietly loses its target instead of failing.
PR #77 stepped around this for --sitemap, --single-file and --changes by emitting them as their own tokens, which leaves the general problem where it was. The engine parses each - token independently, so the real fix is to stop packing: SimpleOption, SimpleOption0 and SimpleOptionFlag each push -<option> as its own token, and the four handlers that write into the shared buffer (MaxSizeHandler m, HostControlHandler H, DosIso9660Handler L, BuildHandler N) do the same. LongOptionFlag then has no reason to exist.
Found by two independent review agents on #77; neither could reach it through the GUI, only through a profile.
OptionsMapperpacks most boolean options into a single-…token, and the engine reads that token one character at a time. Several%options have a two-letter variant that consumes the next argv token:-%rfand-%rsfor WARC,-%mufor sitemap-url,-%Zsfor the single-file cap. When the character following one of those happens to be the variant letter, the engine takes it as the variant.WARC is the only packed option with that shape today, and what saves it is
CheckType, which always emitsu<digit>between%randFollowRobotsTxt'ss<digit>. A profile that carriesCheckType=empty, or out of range (getChildAt(5)returns null, the radio group ends up unchecked, the getter returns null), drops that separator. With WARC ticked the token becomes…X0%rs2%s…, the engine reads--warc-max-size, and it swallows the first crawl URL.strtollrejects the URL so the cap keeps its default, and the crawl quietly loses its target instead of failing.PR #77 stepped around this for
--sitemap,--single-fileand--changesby emitting them as their own tokens, which leaves the general problem where it was. The engine parses each-token independently, so the real fix is to stop packing:SimpleOption,SimpleOption0andSimpleOptionFlageach push-<option>as its own token, and the four handlers that write into the shared buffer (MaxSizeHandlerm,HostControlHandlerH,DosIso9660HandlerL,BuildHandlerN) do the same.LongOptionFlagthen has no reason to exist.Found by two independent review agents on #77; neither could reach it through the GUI, only through a profile.