Fixes on payments and php webapps
This commit is contained in:
parent
e0d31f67e4
commit
120506229a
2
TODO.md
2
TODO.md
|
@ -434,3 +434,5 @@ serailzer self.instance on create.
|
||||||
* backendLog store method and language... and use it for display_script with correct lexer
|
* backendLog store method and language... and use it for display_script with correct lexer
|
||||||
|
|
||||||
# process monitor data to represent state, or maybe create new resource datas when period expires?
|
# process monitor data to represent state, or maybe create new resource datas when period expires?
|
||||||
|
|
||||||
|
# DNS when AAAA is specified include default A register?
|
||||||
|
|
|
@ -60,7 +60,10 @@ class WebApp(models.Model):
|
||||||
qs = WebAppOption.objects.filter(**kwargs)
|
qs = WebAppOption.objects.filter(**kwargs)
|
||||||
for name, value in qs.values_list('name', 'value').order_by('name'):
|
for name, value in qs.values_list('name', 'value').order_by('name'):
|
||||||
if name in options:
|
if name in options:
|
||||||
options[name] = max(options[name], value)
|
if AppOption.get(name).comma_separated:
|
||||||
|
options[name] = options[name].rstrip(',') + ',' + value.lstrip(',')
|
||||||
|
else:
|
||||||
|
options[name] = max(options[name], value)
|
||||||
else:
|
else:
|
||||||
options[name] = value
|
options[name] = value
|
||||||
return options
|
return options
|
||||||
|
|
|
@ -17,6 +17,7 @@ class AppOption(Plugin):
|
||||||
|
|
||||||
help_text = ""
|
help_text = ""
|
||||||
group = None
|
group = None
|
||||||
|
comma_separated = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@cached
|
@cached
|
||||||
|
@ -100,6 +101,7 @@ class PHPEnableFunctions(PHPAppOption):
|
||||||
for i in range(0, len(settings.WEBAPPS_PHP_DISABLED_FUNCTIONS), 10)
|
for i in range(0, len(settings.WEBAPPS_PHP_DISABLED_FUNCTIONS), 10)
|
||||||
])
|
])
|
||||||
regex = r'^[\w\.,-]+$'
|
regex = r'^[\w\.,-]+$'
|
||||||
|
comma_separated = True
|
||||||
|
|
||||||
|
|
||||||
class PHPAllowURLInclude(PHPAppOption):
|
class PHPAllowURLInclude(PHPAppOption):
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Apache2Backend(ServiceController):
|
||||||
|
|
||||||
def render_virtual_host(self, site, context, ssl=False):
|
def render_virtual_host(self, site, context, ssl=False):
|
||||||
context['port'] = self.HTTPS_PORT if ssl else self.HTTP_PORT
|
context['port'] = self.HTTPS_PORT if ssl else self.HTTP_PORT
|
||||||
context['vhost_wrapper_dirs'] = []
|
context['vhost_set_fcgid'] = False
|
||||||
extra_conf = self.get_content_directives(site, context)
|
extra_conf = self.get_content_directives(site, context)
|
||||||
directives = site.get_directives()
|
directives = site.get_directives()
|
||||||
if ssl:
|
if ssl:
|
||||||
|
@ -238,10 +238,11 @@ class Apache2Backend(ServiceController):
|
||||||
directives = ''
|
directives = ''
|
||||||
# This Action trick is used instead of FcgidWrapper because we don't want to define
|
# This Action trick is used instead of FcgidWrapper because we don't want to define
|
||||||
# a new fcgid process class each time an app is mounted (num proc limits enforcement).
|
# a new fcgid process class each time an app is mounted (num proc limits enforcement).
|
||||||
context['wrapper_dir'] = os.path.dirname(wrapper_path)
|
if not context['vhost_set_fcgid']:
|
||||||
if context['wrapper_dir'] not in context['vhost_wrapper_dirs']:
|
|
||||||
# fcgi-bin only needs to be defined once per vhots
|
# fcgi-bin only needs to be defined once per vhots
|
||||||
# We assume that all account wrapper paths will share the same dir
|
# We assume that all account wrapper paths will share the same dir
|
||||||
|
context['wrapper_dir'] = os.path.dirname(wrapper_path)
|
||||||
|
context['vhost_set_fcgid'] = True
|
||||||
directives = textwrap.dedent("""\
|
directives = textwrap.dedent("""\
|
||||||
Alias /fcgi-bin/ %(wrapper_dir)s/
|
Alias /fcgi-bin/ %(wrapper_dir)s/
|
||||||
<Location /fcgi-bin/>
|
<Location /fcgi-bin/>
|
||||||
|
@ -249,7 +250,6 @@ class Apache2Backend(ServiceController):
|
||||||
Options +ExecCGI
|
Options +ExecCGI
|
||||||
</Location>
|
</Location>
|
||||||
""") % context
|
""") % context
|
||||||
context['vhost_wrapper_dirs'].append(context['wrapper_dir'])
|
|
||||||
directives += self.get_location_filesystem_map(context)
|
directives += self.get_location_filesystem_map(context)
|
||||||
directives += textwrap.dedent("""
|
directives += textwrap.dedent("""
|
||||||
ProxyPass %(location)s/ !
|
ProxyPass %(location)s/ !
|
||||||
|
|
Loading…
Reference in a new issue