Make sure temp files created for diffing aren't work-readable

This commit is contained in:
Jamie Cameron 2019-09-19 08:49:25 -07:00
parent 57daa0c1d8
commit 03d77c5703

View File

@ -5780,9 +5780,11 @@ if (exists($main::locked_file_data{$realfile})) {
if (!defined($main::locked_file_data{$realfile})) {
$type = "create";
}
my $u = umask(0700);
open(ORIGFILE, ">$realfile.webminorig");
print ORIGFILE $main::locked_file_data{$realfile};
close(ORIGFILE);
umask($u);
$diff = &backquote_command(
"diff ".quotemeta("$realfile.webminorig")." ".
quotemeta($realfile)." 2>/dev/null");