Bug 251372 - fetch(1) silently accepts invalid options
Summary: fetch(1) silently accepts invalid options
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-25 10:51 UTC by Eirik Oeverby
Modified: 2020-11-25 12:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2020-11-25 10:51:09 UTC
The fetch(1) command silently accepts certain invalid options given on the command line.

E.g.
  fetch -no-verify-hostname -o - https://freebsd.org/
is expected to return an error, given the mistyped (-)-no-verify-hostname option.

Silently ignoring invalid/unknown options is potentially dangerous.
Comment 1 Eirik Oeverby 2020-11-25 12:08:22 UTC
Turns out -n is a valid option, -o takes an argument, so this gave an output file called '-verify-hostname'.

Apologies.