Skip to content

Commit 43fa904

Browse files
committed
Update index.php
Removed ugly error message when paste identifier is invalid (eg. http://mydomain.com/zerobin?foo)
1 parent 28813cd commit 43fa904

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

index.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,11 @@ function processPasteFetch($pasteid)
331331
{
332332
return array('','Paste does not exist, has expired or has been deleted.','');
333333
}
334-
}
334+
}
335+
else
336+
{
337+
return array('','Invalid data','');
338+
}
335339

336340
// Get the paste itself.
337341
$paste=json_decode(file_get_contents($filename));
@@ -395,7 +399,6 @@ function processPasteFetch($pasteid)
395399
else if (!empty($_SERVER['QUERY_STRING'])) // Return an existing paste.
396400
{
397401
list ($CIPHERDATA, $ERRORMESSAGE, $STATUS) = processPasteFetch($_SERVER['QUERY_STRING']);
398-
399402
}
400403

401404
require_once "lib/rain.tpl.class.php";
@@ -406,4 +409,4 @@ function processPasteFetch($pasteid)
406409
$page->assign('ERRORMESSAGE',$ERRORMESSAGE);
407410
$page->assign('STATUS',$STATUS);
408411
$page->draw('page');
409-
?>
412+
?>

0 commit comments

Comments
 (0)