host = os.getenv("WIZARD_WEB_HOST")
path = os.getenv("WIZARD_WEB_PATH")
if host is not None and path is not None:
- return (host, path)
+ return (host, path.rstrip('/'))
if not dir:
dir = os.getcwd()
- _, _, web_path = dir.partition("/web_scripts")
+ # XXX: possible security risk?
+ homedir, _, web_path = dir.partition("/web_scripts")
if not web_path:
return None
- return (util.get_dir_owner(dir) + ".scripts.mit.edu", web_path)
+ return (util.get_dir_owner(homedir) + ".scripts.mit.edu", web_path.rstrip('/'))
def get_quota_usage_and_limit(dir=None):
"""