[security] change public file path code to avoid a trailing , and thus adding / as a static file app in the Pylons middleware cascade

This commit is contained in:
james gardner 2011-03-14 16:05:34 +00:00
parent dfd23d720c
commit 52b17ffceb
1 changed files with 8 additions and 4 deletions

View File

@ -76,8 +76,12 @@ class Harvest(SingletonPlugin):
template_dir = os.path.join(rootdir, 'templates') template_dir = os.path.join(rootdir, 'templates')
public_dir = os.path.join(rootdir, 'public') public_dir = os.path.join(rootdir, 'public')
config['extra_template_paths'] = ','.join([template_dir, if config.get('extra_template_paths'):
config.get('extra_template_paths', '')]) config['extra_template_paths'] += ','+template_dir
config['extra_public_paths'] = ','.join([public_dir, else:
config.get('extra_public_paths', '')]) config['extra_template_paths'] = template_dir
if config.get('extra_public_paths'):
config['extra_public_paths'] += ','+public_dir
else:
config['extra_public_paths'] = public_dir