Suggest and use less -U when showing script for review#22
Merged
lykhvar merged 1 commit intovet-run:mainfrom Jul 25, 2025
Merged
Suggest and use less -U when showing script for review#22lykhvar merged 1 commit intovet-run:mainfrom
lykhvar merged 1 commit intovet-run:mainfrom
Conversation
Without -U it is possible to use characters like backspace (^H) to hide the real script.
Contributor
Author
|
Note I've just used less -U here, it would be nice to expand tabs, but that would require version detection for less or something, see gwsw/less#335. |
Contributor
Author
|
See also https://news.ycombinator.com/item?id=44671221 and https://github.com/jwilk/unfaithful-less for a more elaborate demo of confusing less. |
Contributor
|
Thanks for your contribution — the fix is spot-on. I'm merging this right away. Regarding tab expansion, I've opened issue #26 to track your suggestion — we can continue the discussion there. |
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.
Without -U it is possible to use characters like backspace (^H) to hide the real script.
For example:
(I've previously covered some of this in research like https://dgl.cx/term. There's no security reporting instructions in the repo, so I'm reporting publicly with a fix, as this doesn't seem critical.)