Stop requiring manual escaping in strategy lists - #310
Open
sasha-spb-ru wants to merge 1 commit into
Open
sasha-spb-ru wants to merge 1 commit into
sasha-spb-ru wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.