Commit aa550223 authored by damosoft's avatar damosoft

If a invalid id or empty article data is returned stop before you download junk

parent cb43c127
<?php
// $Header: /cvsroot/tikiwiki/tiki/article_image.php,v 1.15 2005-09-08 01:08:59 damosoft Exp $
// $Header: /cvsroot/tikiwiki/tiki/article_image.php,v 1.16 2005-09-08 01:13:15 damosoft Exp $
// Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
# $Header: /cvsroot/tikiwiki/tiki/article_image.php,v 1.15 2005-09-08 01:08:59 damosoft Exp $
// application to display an image from the database with
// option to resize the image dynamically creating a thumbnail on the fly.
......@@ -30,6 +28,11 @@ if (is_file($topiccachefile) and (!isset($_REQUEST["reload"]))) {
die();
} else {
$data = $tikilib->get_article_image($_REQUEST["id"]);
// if blank then die, otherwise we offer to download strangeness
// this also catches invalid id's
if (!$data) {
die;
}
$type = $data["image_type"];
$data = $data["image_data"];
if ($data["image_data"]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment