X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-download.cgi;h=6979246dbc5c0d65dee58a7acf633e904bd8f742;hp=d4b88ded9341687700c50e0c929aa70a7c3654c9;hb=2755d4a4810600f4392eaf73f362b4f358adeec6;hpb=fbfffdabe931d704aae420984058e61dc4196b01 diff --git a/httemplate/config/config-download.cgi b/httemplate/config/config-download.cgi index d4b88ded9..6979246db 100644 --- a/httemplate/config/config-download.cgi +++ b/httemplate/config/config-download.cgi @@ -5,10 +5,24 @@ %http_header('Content-Type' => 'application/x-unknown' ); % %die "No configuration variable specified (bad URL)!" # umm -% unless $cgi->keywords; -%my($query) = $cgi->keywords; -%$query =~ /^([\w -\)+-\/@;:?=[\]]+)$/; +% unless $cgi->param('key'); +%$cgi->param('key') =~ /^([-\w.]+)$/; %my $name = $1; % +%my $agentnum; +%if ($cgi->param('agentnum') =~ /^(\d+)$/) { +% $agentnum = $1; +%} +% %http_header('Content-Disposition' => "attachment; filename=$name" ); -% print $conf->config_binary($name); +% print $conf->config_binary($name, $agentnum); +<%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $agentnum; +if ($cgi->param('agentnum') =~ /^(\d+)$/) { + $agentnum = $1; +} + +