mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 03:10:18 +01:00
Merge branch 'devel' into devel
This commit is contained in:
@@ -173,7 +173,7 @@ function archive_restore_table($file, $table, $flush=false)
|
||||
foreach($contents as $row)
|
||||
{
|
||||
// Limit max length for a domain entry to 253 chars
|
||||
if(strlen($row[$field]) > 253)
|
||||
if(isset($field) && strlen($row[$field]) > 253)
|
||||
continue;
|
||||
|
||||
// Bind properties from JSON data
|
||||
@@ -196,7 +196,7 @@ function archive_restore_table($file, $table, $flush=false)
|
||||
default:
|
||||
$sqltype = "UNK";
|
||||
}
|
||||
$stmt->bindValue(":".$key, $value, $sqltype);
|
||||
$stmt->bindValue(":".$key, htmlentities($value), $sqltype);
|
||||
}
|
||||
|
||||
if($stmt->execute() && $stmt->reset() && $stmt->clear())
|
||||
@@ -568,7 +568,8 @@ if(isset($_POST["action"]))
|
||||
}
|
||||
else
|
||||
{
|
||||
$tarname = "pi-hole-teleporter_".date("Y-m-d_h-i-s").".tar";
|
||||
$hostname = gethostname() ? gethostname()."-" : "";
|
||||
$tarname = "pi-hole-".$hostname."teleporter_".date("Y-m-d_H-i-s").".tar";
|
||||
$filename = $tarname.".gz";
|
||||
$archive_file_name = sys_get_temp_dir() ."/". $tarname;
|
||||
$archive = new PharData($archive_file_name);
|
||||
|
||||
Reference in New Issue
Block a user