Language: JavaScript
Label: vulnerable
CWE: CWE-668 \u2014 Exposure of Resource to Wrong Sphere
The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.

Code:
			"Sure": function() {
				$( this ).dialog( "close" );
				if(service == "haproxy") {
					ajaxActionServers(action, id);
					if(action == "restart" || action == "reload") {
						if(localStorage.getItem('restart')) {
							localStorage.removeItem('restart');
							$("#apply").css('display', 'none');
						}
					}
				} else if (service == "waf") {
					ajaxActionWafServers(action, id)
				} else if (service == "nginx") {
					ajaxActionNginxServers(action, id)
				} else if (service == "keepalived") {
					ajaxActionKeepalivedServers(action, id)
				} else if (service == "apache") {
					ajaxActionApacheServers(action, id)
				} else if (service == "waf_nginx") {
					ajaxActionWafNginxServers(action, id)
				}
			},