% less .
. is a directory
% less imadir
imadir is a directory
My point is, that behavior is a configuration issue on your end, not inherent to the less codebase.On my end, and on every "end" where I ever log in. "less" works as a simple pager on my own system, but now I need to remember to possibly fix it everywhere else. "You can fix it in the config file" is not an excuse for broken-by-design software.
> ... not inherent to the less codebase.
Well yes, it kind of is. "less" used to be a better replacement for "more." Now it's something else, which should have a different name. Should "cat" be changed to automatically uncompress files and concatenate archives?
"less" already means "pager with all the bells and whistles". If you just want a simple pager, "more" is still there. How many fine gradations do you need?
If you use a simpler program like 'more' or 'pg', you won't have these kinds of vulnerabilities.
Using a simpler program is useless when that's not the problem in the first place. Using more instead gains you nothing except a less useful program.
The problem is parsing complex file formats in unsafe programming languages, and any system which does that will be vulnerable.
This reminds me of an old program called list.com that could open anything as a text file. Any size whatsoever, any line size, etc.
less: somedir: is a directory