Merge pull request #68946 from volth/escape

treewide: fix string escapes
This commit is contained in:
Jörg Thalheim 2019-09-24 04:19:12 +01:00 committed by GitHub
commit bfed455de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 27 deletions

View File

@ -54,8 +54,8 @@ in
type = types.attrsOf types.str; type = types.attrsOf types.str;
default = {}; default = {};
example = { example = {
h = "noaction 5\e("; h = "noaction 5\\e(";
l = "noaction 5\e)"; l = "noaction 5\\e)";
}; };
description = "Defines new command keys."; description = "Defines new command keys.";
}; };

View File

@ -68,7 +68,7 @@ let
replaced with <literal>rspamd_proxy</literal>. replaced with <literal>rspamd_proxy</literal>.
''; '';
apply = let apply = let
from = "services.rspamd.workers.\${name}\".type"; from = "services.rspamd.workers.\"${name}\".type";
files = options.type.files; files = options.type.files;
warning = "The option `${from}` defined in ${showFiles files} has enum value `proxy` which has been renamed to `rspamd_proxy`"; warning = "The option `${from}` defined in ${showFiles files} has enum value `proxy` which has been renamed to `rspamd_proxy`";
in x: if x == "proxy" then traceWarning warning "rspamd_proxy" else x; in x: if x == "proxy" then traceWarning warning "rspamd_proxy" else x;

View File

@ -239,7 +239,7 @@ in {
description = "Any metrics received which match one of the experssions will be dropped."; description = "Any metrics received which match one of the experssions will be dropped.";
default = null; default = null;
type = types.nullOr types.str; type = types.nullOr types.str;
example = "^some\.noisy\.metric\.prefix\..*"; example = "^some\\.noisy\\.metric\\.prefix\\..*";
}; };
whitelist = mkOption { whitelist = mkOption {

View File

@ -465,7 +465,7 @@ in
modules_enabled = { modules_enabled = {
${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList ${ lib.concatStringsSep "\n " (lib.mapAttrsToList
(name: val: optionalString val "${toLua name};") (name: val: optionalString val "${toLua name};")
cfg.modules) } cfg.modules) }
${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)} ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)}

View File

@ -105,8 +105,8 @@ in {
default = null; default = null;
example = { example = {
serverAliases = [ serverAliases = [
"matomo.$\{config.networking.domain\}" "matomo.\${config.networking.domain}"
"stats.$\{config.networking.domain\}" "stats.\${config.networking.domain}"
]; ];
enableACME = false; enableACME = false;
}; };
@ -115,7 +115,7 @@ in {
Either this option or the webServerUser option is mandatory. Either this option or the webServerUser option is mandatory.
Set this to {} to just enable the virtualHost if you don't need any customization. Set this to {} to just enable the virtualHost if you don't need any customization.
If enabled, then by default, the <option>serverName</option> is If enabled, then by default, the <option>serverName</option> is
<literal>${user}.$\{config.networking.hostName\}.$\{config.networking.domain\}</literal>, <literal>''${user}.''${config.networking.hostName}.''${config.networking.domain}</literal>,
SSL is active, and certificates are acquired via ACME. SSL is active, and certificates are acquired via ACME.
If this is set to null (the default), no nginx virtualHost will be configured. If this is set to null (the default), no nginx virtualHost will be configured.
''; '';
@ -275,7 +275,7 @@ in {
fastcgi_pass unix:${phpSocket}; fastcgi_pass unix:${phpSocket};
''; '';
# Any other attempt to access any php files is forbidden # Any other attempt to access any php files is forbidden
locations."~* ^.+\.php$".extraConfig = '' locations."~* ^.+\\.php$".extraConfig = ''
return 403; return 403;
''; '';
# Disallow access to unneeded directories # Disallow access to unneeded directories
@ -284,7 +284,7 @@ in {
return 403; return 403;
''; '';
# Disallow access to several helper files # Disallow access to several helper files
locations."~* \.(?:bat|git|ini|sh|txt|tpl|xml|md)$".extraConfig = '' locations."~* \\.(?:bat|git|ini|sh|txt|tpl|xml|md)$".extraConfig = ''
return 403; return 403;
''; '';
# No crawling of this site for bots that obey robots.txt - no useful information here. # No crawling of this site for bots that obey robots.txt - no useful information here.

View File

@ -235,7 +235,7 @@ in
locations."/".root = "${runDir}/client"; locations."/".root = "${runDir}/client";
locations."~ \.php$" = { locations."~ \\.php$" = {
tryFiles = "$uri =404"; tryFiles = "$uri =404";
extraConfig = '' extraConfig = ''
include ${pkgs.nginx}/conf/fastcgi_params; include ${pkgs.nginx}/conf/fastcgi_params;
@ -246,7 +246,7 @@ in
''; '';
}; };
locations."~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico)" = { locations."~* \\.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico)" = {
root = "${runDir}/client"; root = "${runDir}/client";
extraConfig = '' extraConfig = ''
if (-f $request_filename) { if (-f $request_filename) {

View File

@ -548,7 +548,7 @@ let
index = "index.php"; index = "index.php";
}; };
locations."~ \.php$" = { locations."~ \\.php$" = {
extraConfig = '' extraConfig = ''
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.socket}; fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.socket};

View File

@ -80,7 +80,7 @@ stdenv.mkDerivation {
postInstall = " postInstall = "
rpath=`patchelf --print-rpath \$out/bin/kino`; rpath=`patchelf --print-rpath \$out/bin/kino`;
for i in $\buildInputs; do for i in $buildInputs; do
echo adding \$i/lib echo adding \$i/lib
rpath=\$rpath\${rpath:+:}\$i/lib rpath=\$rpath\${rpath:+:}\$i/lib
done done

View File

@ -57676,7 +57676,7 @@ self: {
version = "0.1.0.1"; version = "0.1.0.1";
sha256 = "0rwi5zwvqn18g7qyp9aw51w3yzkqbff9g7rcqdk1l871fvq8qhha"; sha256 = "0rwi5zwvqn18g7qyp9aw51w3yzkqbff9g7rcqdk1l871fvq8qhha";
libraryHaskellDepends = [ base ]; libraryHaskellDepends = [ base ];
description = "Haskell operator `g ... f = \x1 .. xn -> g (f x1 .. xn)`."; description = "Haskell operator `g ... f = \\x1 .. xn -> g (f x1 .. xn)`.";
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
}) {}; }) {};
@ -253088,7 +253088,7 @@ self: {
base containers exceptions free spiros split text transformers base containers exceptions free spiros split text transformers
]; ];
executableHaskellDepends = [ base ]; executableHaskellDepends = [ base ];
description = "Automate keyboard\/mouse\/clipboard\/application interaction"; description = "Automate keyboard/mouse/clipboard/application interaction";
license = stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
hydraPlatforms = stdenv.lib.platforms.none; hydraPlatforms = stdenv.lib.platforms.none;
broken = true; broken = true;

View File

@ -27,10 +27,10 @@ with pkgs.stdenv.lib;
# don't scan version control directories # don't scan version control directories
defaultArgs = [ defaultArgs = [
"--exclude=\.svn" "--exclude=.svn"
"--exclude=\.hg" "--exclude=.hg"
"--exclude=\.git" "--exclude=.git"
"--exclude=\_darcs" "--exclude=_darcs"
"--sort=yes" "--sort=yes"
]; ];
@ -38,8 +38,8 @@ with pkgs.stdenv.lib;
asLang = [ asLang = [
"--langdef=ActionScript" "--langdef=ActionScript"
"--langmap=ActionScript:.as" "--langmap=ActionScript:.as"
"--regex-ActionScript=/function[ \\t]+([A-Za-z0-9_]+)[ \\t]*\\(/\1/f,function,functions/" "--regex-ActionScript=/function[ \\t]+([A-Za-z0-9_]+)[ \\t]*\\(/\\1/f,function,functions/"
"--regex-ActionScript=/function[ \\t]+(set|get)[ \\t]+([A-Za-z0-9_]+)[ \\t]*\\(/\2/p,property,properties/" "--regex-ActionScript=/function[ \\t]+(set|get)[ \\t]+([A-Za-z0-9_]+)[ \\t]*\\(/\\2/p,property,properties/"
"--regex-ActionScript=/interface[ \\t]+[a-z0-9_.]*([A-Z][A-Za-z0-9_]+)/\\1/i,interface,interfaces/" "--regex-ActionScript=/interface[ \\t]+[a-z0-9_.]*([A-Z][A-Za-z0-9_]+)/\\1/i,interface,interfaces/"
"--regex-ActionScript=/package[ \\t]+([^ \\t]*)/\\1/p/" "--regex-ActionScript=/package[ \\t]+([^ \\t]*)/\\1/p/"
"--regex-ActionScript=/class[ \\t]+[a-z0-9_.]*([A-Z][A-Za-z0-9_]+)/\\1/c,class,classes/" "--regex-ActionScript=/class[ \\t]+[a-z0-9_.]*([A-Z][A-Za-z0-9_]+)/\\1/c,class,classes/"
@ -67,7 +67,7 @@ with pkgs.stdenv.lib;
nixLang = [ nixLang = [
"--langdef=NIX" "--langdef=NIX"
"--langmap=NIX:.nix" "--langmap=NIX:.nix"
"--regex-NIX=/\([^ \\t*]*\)[ \\t]*=/\\1/f/" "--regex-NIX=/([^ \\t*]*)[ \\t]*=/\\1/f/"
]; ];
rubyLang = [ rubyLang = [

View File

@ -14,8 +14,8 @@ appleDerivation {
# + lib.optionalString hostPlatform.isAarch32 "-D__arm__"; # + lib.optionalString hostPlatform.isAarch32 "-D__arm__";
NIX_CFLAGS_COMPILE = [ "-DDAEMON_UID=1" NIX_CFLAGS_COMPILE = [ "-DDAEMON_UID=1"
"-DDAEMON_GID=1" "-DDAEMON_GID=1"
"-DDEFAULT_AT_QUEUE=\'a\'" "-DDEFAULT_AT_QUEUE='a'"
"-DDEFAULT_BATCH_QUEUE=\'b\'" "-DDEFAULT_BATCH_QUEUE='b'"
"-DPERM_PATH=\"/usr/lib/cron/\"" "-DPERM_PATH=\"/usr/lib/cron/\""
"-DOPEN_DIRECTORY" "-DOPEN_DIRECTORY"
"-DNO_DIRECT_RPC" "-DNO_DIRECT_RPC"

View File

@ -136,9 +136,9 @@ in buildEnv {
script = script =
writeText "hyphens.sed" ( writeText "hyphens.sed" (
# pick up the header # pick up the header
"1,/^\% from/p;" "1,/^% from/p;"
# pick up all sections matching packages that we combine # pick up all sections matching packages that we combine
+ lib.concatMapStrings (pname: "/^\% from ${pname}:$/,/^\%/p;\n") pnames + lib.concatMapStrings (pname: "/^% from ${pname}:$/,/^%/p;\n") pnames
); );
in '' in ''
( (