Skip to content

Commit 7392f1b

Browse files
Restrict the allowed characters between the brackets. This is necessary because it might include nested brackets. (#45041)
"[13804] [Fri Nov 11 16:37:08 2022] [::1]" would resolve into "[Fri Nov 11 16:37:08 2022] [::1"
1 parent 4598d01 commit 7392f1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Foundation/Console/ServeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ protected function handleProcessOutput()
300300
protected function getDateFromLine($line)
301301
{
302302
$regex = env('PHP_CLI_SERVER_WORKERS', 1) > 1
303-
? '/^\[\d+]\s\[(.*)]/'
303+
? '/^\[\d+]\s\[([a-zA-Z0-9: ]+)\]/'
304304
: '/^\[([^\]]+)\]/';
305305

306306
preg_match($regex, $line, $matches);

0 commit comments

Comments
 (0)