Skip to content

Commit 79df81f

Browse files
authored
Update Toolbar.php
1 parent 524e10a commit 79df81f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

system/Debug/Toolbar.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ public function respond()
486486

487487
//Validate and sanitize the debugbar_time parameter -- ss
488488
$debugbarTime= $request->getGet('debugbar_time');
489-
if (!preg_match('/^[a-zA-Z0-9_]+$/', $debugbarTime)) {
489+
if (!preg_match('/^\d+(\.\d+)?$/', $debugbarTime)) {
490490
throw new \InvalidArgumentException('Invalid debugbar_time parameter.');
491491
}
492492

@@ -503,6 +503,12 @@ public function respond()
503503

504504
exit;
505505
}
506+
507+
// Filename not found
508+
http_response_code(404);
509+
510+
exit; // Exit here is needed to avoid loading the index page
511+
}
506512
}
507513

508514
/**

0 commit comments

Comments
 (0)