Skip to content

Commit 9c04a45

Browse files
committed
Validates version format before using it
1 parent 9cfbdf4 commit 9c04a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/Concerns/InstallsFrankenPhpDependencies.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ protected function ensureFrankenPhpBinaryMeetsRequirements($frakenPhpBinary)
132132

133133
$version = explode(' ', $version)[1] ?? null;
134134

135-
if ($version === null) {
135+
if ($version === null || preg_match('/\d+\.\d+\.\d+/', $version) !== 1) {
136136
return $this->warn(
137137
'Unable to determine the current FrankenPHP binary version. Please report this issue: https://github.com/laravel/octane/issues/new.',
138138
);

0 commit comments

Comments
 (0)