Skip to content

Commit

Permalink
Make index.html readonly to reduce risk of cyber vandalism
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Sep 27, 2024
1 parent 54026bd commit 9b1fc88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -2205,11 +2205,12 @@ sub print_person
print $index_html '</html>';
close $index_html;
print $csv '1!';
chmod 0444, $index_html;
} else {
if(!-e $filename) {
open(my $index_html, '>', $filename);
print $index_html '<html>';
print $index_html "<head><title>The Family Tree $name</title>",
print $index_html '<html>',
"<head><title>The Family Tree $name</title>",
'<meta http-equiv="Refresh" content="1;URL=history.html">';
if(my $lang = $ENV{'LANG'}) {
$lang =~ s/\.UTF-8//;
Expand All @@ -2221,6 +2222,7 @@ sub print_person
"<body><h1>Family History</h1><a href=\"history.html\">Family History</a></body>";
print $index_html '</html>';
close $index_html;
chmod 0444, $index_html;
}
print $csv '0!';
}
Expand Down

0 comments on commit 9b1fc88

Please sign in to comment.