git.iko.soy/typeable/nixpkgs
on master help sign in
display-managers module: improve variable quoting

Fixes #20713, though I'm certain nixpkgs contains loads of places without proper quoting, as (ba)sh unfortunately encourages that. The only plus side is that most of such problems in nixpkgs aren't actually security problems but mere annoyance to those who are foolish enough to use "weird" characters in critical names.

commit8ebfce0eda627ffa739e16279ac543f4d50cd60c authorVladimír Čunát <vcunat@gmail.com> dateSat 26 Nov 2016, 11:18 (10 years ago) parentca77ba3
1 file changed+4−4
nixos/modules/services/x11/display-managers/default.nix+4−4
nixos/modules/services/x11/display-managers/default.nix+4−4
@@ -82,12 +82,12 @@ let
8282
8383 # Speed up application start by 50-150ms according to
8484 # http://kdemonkey.blogspot.nl/2008/04/magic-trick.html
85− rm -rf $HOME/.compose-cache
86− mkdir $HOME/.compose-cache
85+ rm -rf "$HOME/.compose-cache"
86+ mkdir "$HOME/.compose-cache"
8787
8888 # Work around KDE errors when a user first logs in and
8989 # .local/share doesn't exist yet.
90− mkdir -p $HOME/.local/share
90+ mkdir -p "$HOME/.local/share"
9191
9292 unset _DID_SYSTEMD_CAT
9393
@@ -148,7 +148,7 @@ let
148148 allowSubstitutes = false;
149149 }
150150 ''
151− mkdir -p $out
151+ mkdir -p "$out"
152152 ${concatMapStrings (n: ''
153153 cat - > "$out/${n}.desktop" << EODESKTOP
154154 [Desktop Entry]