Skip to content

Stop requiring manual escaping in strategy lists - #310

Open
sasha-spb-ru wants to merge 1 commit into
bol-van:masterfrom
sasha-spb-ru:fix-strategy-escaping
Open

sasha-spb-ru wants to merge 1 commit into
bol-van:masterfrom
sasha-spb-ru:fix-strategy-escaping

Conversation

@sasha-spb-ru

@sasha-spb-ru sasha-spb-ru commented Sep 16, 2026

Copy link
Copy Markdown

Custom test lists could not previously contain a strategy verbatim if it used characters that are syntactically meaningful to eval'd shell but are also valid nfqws2/lua-desync syntax -- < (e.g. --out-range=s1<d1), or (, ), ' (e.g. a --lua-init=...=tls_mod(...,'rnd') expression). check_list() already runs a dry-run eval to catch exactly this and warn about it; now, when that dry run fails, it falls back to a plain whitespace-only split instead of giving up, so the line still runs correctly with no manual escaping needed.

Manually-escaped lines are unaffected: the eval path is tried first and still wins when it succeeds, so this only changes what happens to lines that would previously have just printed "BAD STRATEGY" and been skipped.

Custom strategy lists are plain text, and each line gets run through the
shell - so a strategy containing certain characters (<, parentheses,
quotes) would fail unless you added quotes around it by hand. Some real,
valid strategies use exactly these characters.

Now, when a line fails for that reason, it's automatically retried in
a simpler way that doesn't care about those characters at all. You can
paste a strategy in exactly as blockcheck2 prints it and it'll just
work. Manual escaping still works too, and is tried first if you're
already doing it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant