mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-web: small fixes
This commit is contained in:
parent
99126b6144
commit
6e129da180
@ -39,6 +39,7 @@ if ( $_POST['action'] == "cfgreq" )
|
||||
// checkbox (yes/no) field
|
||||
if ( preg_match('/^(\w+)_=(yes|no)$/', $line, $matches) )
|
||||
{
|
||||
$checked = "";
|
||||
if ( $matches[2] == "yes" )
|
||||
$checked = "checked";
|
||||
$output = $output . "<tr>";
|
||||
|
||||
@ -48,6 +48,12 @@ function follow($file)
|
||||
$size = 0;
|
||||
while (true)
|
||||
{
|
||||
if ( !file_exists($file) )
|
||||
{
|
||||
usleep(200000); // 0.2s
|
||||
continue;
|
||||
}
|
||||
|
||||
clearstatcache();
|
||||
$currentSize = filesize($file);
|
||||
if ($size == $currentSize)
|
||||
|
||||
@ -9,6 +9,18 @@
|
||||
<link href="CSS/wizard.css" rel="stylesheet">
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// security headers
|
||||
header("Content-Security-Policy: default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self'; object-src 'self';");
|
||||
header("X-XSS-Protection: 1; mode=block");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("X-Robots-Tag: none");
|
||||
header("X-Permitted-Cross-Domain-Policies: none");
|
||||
header("X-Frame-Options: DENY");
|
||||
header("Cache-Control: max-age=15778463");
|
||||
ini_set('session.cookie_httponly', 1);
|
||||
if ( isset($_SERVER['HTTPS']) )
|
||||
ini_set('session.cookie_secure', 1);
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user