Skip to content

Commit 41df300

Browse files
committed
arbitrary JSON file disclosure correction
The following securit issue has been fixed: #30
1 parent 241c75a commit 41df300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function deletePaste($pasteid)
268268
if (!empty($_SERVER['QUERY_STRING'])) // Display an existing paste.
269269
{
270270
$dataid = $_SERVER['QUERY_STRING'];
271-
if (preg_match('/[a-f\d]{16}/',$dataid)) // Is this a valid paste identifier ?
271+
if (preg_match('/\A[a-f\d]{16}\z/',$dataid)) // Is this a valid paste identifier ?
272272
{
273273
$filename = dataid2path($dataid).$dataid;
274274
if (is_file($filename)) // Check that paste exists.

0 commit comments

Comments
 (0)