From 415b92765351aa44a698c866c2eb5a3dd60c036c Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Sat, 2 Mar 2019 10:43:08 +0100 Subject: [PATCH] nixos/nextcloud: fix escapings and ocm-provider --- nixos/modules/services/web-apps/nextcloud.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 498e3fdb23af..5ad241ace5c8 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -427,19 +427,19 @@ in { priority = 210; extraConfig = "return 301 $scheme://$host/remote.php/dav;"; }; - "~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/" = { + "~ ^\\/(?:build|tests|config|lib|3rdparty|templates|data)\\/" = { priority = 300; extraConfig = "deny all;"; }; - "~ ^/(?:\\.|autotest|occ|issue|indie|db_|console)" = { + "~ ^\\/(?:\\.|autotest|occ|issue|indie|db_|console)" = { priority = 300; extraConfig = "deny all;"; }; - "~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\\.php(?:$|/)" = { + "~ ^\\/(?:index|remote|public|cron|core/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|ocs-provider\\/.+|ocm-provider\\/.+)\\.php(?:$|\\/)" = { priority = 500; extraConfig = '' include ${config.services.nginx.package}/conf/fastcgi.conf; - fastcgi_split_path_info ^(.+\.php)(/.*)$; + fastcgi_split_path_info ^(.+\.php)(\\/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS ${if cfg.https then "on" else "off"}; fastcgi_param modHeadersAvailable true; @@ -450,7 +450,7 @@ in { fastcgi_read_timeout 120s; ''; }; - "~ ^/(?:updater|ocs-provider|ocm-provider)(?:$|\/)".extraConfig = '' + "~ ^\\/(?:updater|ocs-provider|ocm-provider)(?:$|\\/)".extraConfig = '' try_files $uri/ =404; index index.php; '';