From f22ca0d212c2078c6573044bfe0ec51318a53801 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 30 Jun 2017 12:00:19 +0200 Subject: [PATCH] [FIX] runbot: escape server name in nginx config --- runbot/runbot.py | 1 + runbot/runbot.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index b82c6c6b..dc111a1b 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -418,6 +418,7 @@ class runbot_repo(osv.osv): settings['runbot_static'] = os.path.join(get_module_resource('runbot', 'static'), '') nginx_dir = os.path.join(self._root(cr, uid), 'nginx') settings['nginx_dir'] = nginx_dir + settings['re_escape'] = re.escape ids = self.search(cr, uid, [('nginx','=',True)], order='id') if ids: build_ids = self.pool['runbot.build'].search(cr, uid, [('repo_id','in',ids), ('state','=','running')]) diff --git a/runbot/runbot.xml b/runbot/runbot.xml index 3866d3e2..d71c9929 100644 --- a/runbot/runbot.xml +++ b/runbot/runbot.xml @@ -704,7 +704,7 @@ http { server { listen 8080; - server_name ~^[-.].*$; + server_name ~^[-.].*$; location / { proxy_pass http://127.0.0.1:; } location /longpolling { proxy_pass http://127.0.0.1:; } }