Handle hostnames with upper-case letters
[webmin.git] / shorewall / manual_save.cgi
1 #!/usr/local/bin/perl
2 # Save the contents of a table file
3
4 require './shorewall-lib.pl';
5 &ReadParseMime();
6 &can_access($in{'table'}) || &error($text{'list_ecannot'});
7 &error_setup($text{'manual_err'});
8 $file = "$config{'config_dir'}/$in{'table'}";
9 $in{'table'} =~ /\.\./ && &error($text{'manual_efile'});
10 $in{'data'} =~ s/\r//g;
11 $in{'data'} || &error($text{'manual_edata'});
12
13 &open_lock_tempfile(FILE, ">$file");
14 &print_tempfile(FILE, $in{'data'});
15 &close_tempfile(FILE);
16 &webmin_log('manual', 'table', $in{'table'});
17 &redirect("list.cgi?table=$in{'table'}");
18