1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 18:04:03 +00:00

Validate SQLite DB name unconditionally in getPath()

This commit is contained in:
lukinovec 2026-05-01 14:15:47 +02:00
parent 7683befa54
commit e48d822772

View file

@ -157,12 +157,12 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
public function getPath(string $name): string public function getPath(string $name): string
{ {
$this->validateDatabaseName($name);
if (static::$path) { if (static::$path) {
return rtrim(static::$path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $name; return rtrim(static::$path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $name;
} }
$this->validateDatabaseName($name);
return database_path($name); return database_path($name);
} }