bug(sort): error "options `-gh` are incompatible" is bypassable
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
Research direction
Start with the sort command’s option parsing and the tests for incompatible sort flags; the issue does not name specific files. Reproduce the bypass with -h --sort general-numeric --sort human-numeric, then compare its behavior with GNU sort. Done means the incompatible combination is rejected consistently, with a regression test covering repeated --sort options.
Written by the indexing model from the issue text.
Description
Hi, uutils mainteners
try normally with
relunsec@relunsec:~/software/coreutils/target/debug$ ./sort -h --sort=general-numeric a
sort: options '-gh' are incompatible
relunsec@relunsec:~/software/coreutils/target/debug$ gnusort -h --sort=general-numeric a
gnusort: options '-gh' are incompatible
it will fail but the uu sort error can be bypassed via
relunsec@relunsec:~/software/coreutils/target/debug$ ./sort -h --sort general-numeric --sort human-numeric a
a87#$
ajahjhba
baz
hello
relunsec@relunsec:~/software/coreutils/target/debug$ gnusort -h --sort general-numeric --sort human-numeric a
gnusort: options '-gh' are incompatible
relunsec@relunsec:~/software/coreutils/target/debug$
this, as you can see uutils tricked, and allowed mixing the flags
- Dominant language
- Rust
- Stars
- 24.3k
- Forks
- 2.1k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 313
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/coreutils
-
U - sort
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
uutils/coreutils#15598 · 3 comments ·
Maintainers usually reply within 1 day
-
U - sort
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
U - sort
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 1 day
-
nl: unnumbered lines are padded with width+1 spaces, ignoring the length of `-s`Possibly taken @cakebaker claimed this today. OpenU - nl
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
sort: `-b` and `-M` still skip leading form feed and carriage return (follow-up to #14119)Possibly taken @ozenyunus35 claimed this today. OpenU - sort
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in uutils/coreutils
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
area:sim good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
The demo's interval button and chart legend keep the previous interval after an interval changeOpenbug ui
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
userFRM/egui-charts#670 ·
Maintainers usually reply within 1 day
-
docs good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Usenova-Labs/usenova-backend#35 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
lugassawan/swe-workbench#823 ·
Maintainers usually reply within 1 day