43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
Index: webapp-config-1.50.16/WebappConfig/config.py
|
|
===================================================================
|
|
--- webapp-config-1.50.16.orig/WebappConfig/config.py
|
|
+++ webapp-config-1.50.16/WebappConfig/config.py
|
|
@@ -204,6 +204,7 @@ class Config:
|
|
pass
|
|
|
|
self.__d = {
|
|
+ 'allow_absolute' : 'no',
|
|
'config_protect' : wrapper.config_protect,
|
|
# Necessary to load the config file
|
|
'my_etcconfig' : '/etc/vhosts/webapp-config',
|
|
@@ -870,8 +871,13 @@ class Config:
|
|
#
|
|
# this makes sure we don't write rubbish into the installs list
|
|
|
|
- installpath = self.config.get('USER', 'g_htdocsdir') + '/' + \
|
|
- self.config.get('USER', 'g_installdir')
|
|
+ g_installdir = self.config.get('USER', 'g_installdir')
|
|
+
|
|
+ if (os.path.isabs(g_installdir)
|
|
+ and self.config.get('USER', 'allow_absolute') == 'yes'):
|
|
+ installpath = g_installdir
|
|
+ else:
|
|
+ installpath = self.config.get('USER', 'g_htdocsdir') + '/' + g_installdir
|
|
|
|
installpath = re.compile('/+').sub('/', self.__root + installpath)
|
|
|
|
Index: webapp-config-1.50.16/config/webapp-config
|
|
===================================================================
|
|
--- webapp-config-1.50.16.orig/config/webapp-config
|
|
+++ webapp-config-1.50.16/config/webapp-config
|
|
@@ -183,6 +183,9 @@ vhost_perms_virtualowned_file="o-w"
|
|
|
|
vhost_perms_installdir="0755"
|
|
|
|
+# Allow specifying absolute path names using the -d option?
|
|
+allow_absolute="no"
|
|
+
|
|
|
|
# ========================================================================
|
|
# END OF USER-EDITABLE SETTINGS
|