Commits

Olemis Lang  committed f15dc7c

BH Multiproduct #594 : Safe queries for WSGI SCRIPT_NAME in hooks

  • Participants
  • Parent commits 3459851
  • Branches t594_nginx_script_name

Comments (0)

Files changed (2)

+t594/t594_r1503620_hooks_safe_script_name.diff

File t594/t594_r1503620_hooks_safe_script_name.diff

+# HG changeset patch
+# Parent 787d3676d94746bd384763f16e1d1bf10cf3f92e
+BH Multiproduct #594 : Safe queries for SCRIPT_NAME in hooks.py
+
+diff -r 787d3676d947 bloodhound_multiproduct/multiproduct/hooks.py
+--- a/bloodhound_multiproduct/multiproduct/hooks.py	Tue Jul 16 09:00:10 2013 +0000
++++ b/bloodhound_multiproduct/multiproduct/hooks.py	Tue Jul 16 19:26:59 2013 -0500
+@@ -38,6 +38,9 @@
+ 
+ class MultiProductEnvironmentFactory(EnvironmentFactoryBase):
+     def open_environment(self, environ, env_path, global_env, use_cache=False):
++        # Ensure SCRIPT_NAME var is set -- see bh:ticket:594
++        environ.setdefault('SCRIPT_NAME', '')
++
+         env = pid = None
+         path_info = environ.get('PATH_INFO')
+         if not path_info: