bug(date): when using -f which a file contains "j" or "9j" or any military time that ends with j, it rejected
Open
Nobody has claimed this yet.
U - date
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutils mainteners
that was a big issue undiscovered in the date command, i discovered when putting a miliatry date in dates.txt file by example
will be rejected which normally accepted with -d 9j or -d j directly
relunsec@relunsec:~/software/coreutils/target/debug$ echo "9j" > dates.txt
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -f dates.txt
date: invalid date '9j'
relunsec@relunsec:~/software/coreutils/target/debug$ echo "j" > dates.txt
relunsec@relunsec:~/software/coreutils/target/debug$ ./date -f dates.txt
date: invalid date 'j'
relunsec@relunsec:~/software/coreutils/target/debug$
it needs to be fixed, that is the issue left undiscovered for years
Contributor 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.
Research direction
Start with the date command's handling of -f input and compare it with direct -d parsing for values such as "j" and "9j". Reproduce the failure using dates.txt, then add coverage showing that military times ending in j are accepted from file input as they are from direct arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100