>From a56c921c2d2196e54009b39e3b956eae0f7ea556 Mon Sep 17 00:00:00 2001 From: Bill Peck Date: Fri, 30 Apr 2010 13:59:43 -0400 Subject: [PATCH 12/14] fixes /var/www/cobbler/svc/services.py to canonicalize the uri before parsing it. This fixes a regression with mod_wsgi enabled and trying to provision a rhel3 machine. --- scripts/services.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/scripts/services.py b/scripts/services.py index 22c6927..c94bc83 100755 --- a/scripts/services.py +++ b/scripts/services.py @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA """ import yaml +import os from cobbler.services import CobblerSvc @@ -36,6 +37,9 @@ def application(environ, start_response): # not tolerating ";" and also libvirt on 5.1 not # tolerating "&" (nor "&"). + # canonicalizes uri, mod_python does this, mod_wsgi does not + my_uri = os.path.realpath(my_uri) + tokens = my_uri.split("/") tokens = tokens[3:] label = True -- 1.6.6.1