mirror of
https://github.com/retspen/webvirtcloud
synced 2025-01-13 08:55:17 +00:00
remove eval for security concerns
This commit is contained in:
parent
f690d1fa60
commit
5c9a5daedc
2 changed files with 9 additions and 9 deletions
|
@ -793,9 +793,9 @@ def set_vcpu(request, pk):
|
||||||
@superuser_only
|
@superuser_only
|
||||||
def set_vcpu_hotplug(request, pk):
|
def set_vcpu_hotplug(request, pk):
|
||||||
instance = get_instance(request.user, pk)
|
instance = get_instance(request.user, pk)
|
||||||
status = request.POST.get("vcpu_hotplug", "")
|
status = True if request.POST.get("vcpu_hotplug", "False") == 'True' else False
|
||||||
msg = _("VCPU Hot-plug is enabled=%(status)s") % {"status": status}
|
msg = _("VCPU Hot-plug is enabled=%(status)s") % {"status": status}
|
||||||
instance.proxy.set_vcpu_hotplug(eval(status))
|
instance.proxy.set_vcpu_hotplug(status)
|
||||||
addlogmsg(request.user.username, instance.compute.name, instance.name, msg)
|
addlogmsg(request.user.username, instance.compute.name, instance.name, msg)
|
||||||
return redirect(request.META.get("HTTP_REFERER") + "#resize")
|
return redirect(request.META.get("HTTP_REFERER") + "#resize")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue