| Server IP : 37.9.174.138 / Your IP : 216.73.216.117 Web Server : Apache System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 User : ftpuser ( 1001) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/grub2/ |
Upload File : |
#!/usr/bin/perl
# Save a manually edited allowlisted GRUB 2 file.
use strict;
use warnings;
require './grub2-lib.pl'; ## no critic
our (%in, %text);
&ReadParseMime();
&error_setup($text{'manual_err'});
my %access = &get_module_acl();
&error("$text{'eacl_np'} $text{'eacl_pmanual'}") if (!$access{'manual'});
# Re-check the allowlist on save; the form value is not trusted.
my $file = $in{'file'} || '';
&grub2_manual_file($file) || &error($text{'manual_efile'});
$in{'data'} = '' if (!defined($in{'data'}));
$in{'data'} =~ s/\r//g;
# Each file type gets its own validator before the locked write happens.
my $err = &save_manual_grub_file($file, $in{'data'});
&error(&text('manual_evalidate', $err)) if ($err);
&grub2_mark_regenerate_needed();
&webmin_log("manual", undef, $file);
&redirect("");