bash: escape historyIgnore value

Since this option is very unlikely to contain a shell variable we
should be safe doing a full shell escaping.

Fixes #3249
This commit is contained in:
Robert Helgesson 2022-12-23 10:02:39 +01:00
parent 0f8bf4f92e
commit eb9ff9556d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -202,7 +202,7 @@ in
HISTCONTROL = concatStringsSep ":" cfg.historyControl;
}
// optionalAttrs (cfg.historyIgnore != []) {
HISTIGNORE = concatStringsSep ":" cfg.historyIgnore;
HISTIGNORE = escapeShellArg (concatStringsSep ":" cfg.historyIgnore);
}
));
in mkIf cfg.enable {