Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Handling of double quotes in command arguments

Offen
#182 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
c
Bereich
cli, security

Rechercherichtung

Start by reading the sudoers manual section on command arguments and the parser or matching code that handles quoted arguments; the issue does not name specific files or tests. Reproduce the two examples from the report on a current version and trace how quoted and empty arguments are matched. Done means the allowed commands match the documented quoting rules, with regression tests covering both examples.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

As far as I understand from the manual, double quotes can be used to escape special characters in any context and they should always be balanced (or escaped with a \). When it comes to command-line arguments though, I observe the following behaviour (on version 1.9.9 and prior; apologies I'm not able to test on the latest version):

The following entry:

   test ALL = NOPASSWD: /bin/ls " foo"

results in user test being able to run these two commands:

   sudo ls '" foo"'
   sudo ls '"' 'foo"'

but not what is expected:

   sudo ls ' foo'

and the following entry:

   test ALL = NOPASSWD: /bin/ls ""

results in user test being able to run both:

   sudo ls '""'
   sudo ls
Vorherrschende Sprache
C
Sterne
1.7k
Forks
306
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
24

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sudo-project/sudo

Alle Issues in sudo-project/sudo

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.