Skip to content

Commit

Permalink
Validate file path
Browse files Browse the repository at this point in the history
  • Loading branch information
netpok committed Apr 15, 2021
1 parent c448336 commit ee78372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Migrations/Migrator.php
Expand Up @@ -470,7 +470,7 @@ protected function resolvePath(string $path)
{
$class = $this->getMigrationClass($this->getMigrationName($path));

if (class_exists($class)) {
if (class_exists($class) && realpath($path) == (new ReflectionClass($class))->getFileName()) {
return new $class;
}

Expand Down

0 comments on commit ee78372

Please sign in to comment.