diff --git a/core/page.php b/core/page.php index 2a6f9966..baa9f273 100644 --- a/core/page.php +++ b/core/page.php @@ -365,7 +365,7 @@ class Page $start = 0; // Start byte $end = $size - 1; // End byte - header("Content-Length: " . strlen($size)); + header("Content-Length: " . $size); header('Accept-Ranges: bytes'); if (isset($_SERVER['HTTP_RANGE'])) { diff --git a/ext/report_image/main.php b/ext/report_image/main.php index 367a0417..4d23d679 100644 --- a/ext/report_image/main.php +++ b/ext/report_image/main.php @@ -59,7 +59,7 @@ class ReportImage extends Extension } elseif ($event->get_arg(0) == "remove") { if (!empty($_POST['id'])) { if ($user->can(Permissions::VIEW_IMAGE_REPORT)) { - send_event(new RemoveReportedImageEvent($_POST['id'])); + send_event(new RemoveReportedImageEvent(int_escape($_POST['id']))); $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("image_report/list")); }