Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ddns-updater ignores unknown arguments #920

Open
maruel opened this issue Jan 23, 2025 · 0 comments
Open

Bug: ddns-updater ignores unknown arguments #920

maruel opened this issue Jan 23, 2025 · 0 comments

Comments

@maruel
Copy link

maruel commented Jan 23, 2025

TLDR: Running ddns-updater --unknown-argument runs ignoring unknown arguments

  1. Is this urgent: No
  2. DNS provider(s) you use: N/A
  3. Program version: v2.9.0
  4. What are you using to run the container: running directly via go install
  5. Extra information:
    • Host OS: ubuntu 22.04

Issue

Because of the way the arguments are treated as if they were environment variables, all arguments are processed even if they are not defined nor used.

This is a problem when someone does a typo in the argument, as the typo'ed argument will be silently ignored. This is very confusing for users.

Proposal

  1. Do not silently ignore unknown subcommands in _main().
  2. Do not silently ignore unknown arguments. Enforce an allowlist of arguments. This requires changing flag.New() from gosettings to have an allowlist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant