mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-07 00:04:04 +00:00
Make in-memory DB detection more strict
In-memory DBs have to start with "file:_tenancy_inmemory_". This prevents path traversal.
This commit is contained in:
parent
b1f0d0a43c
commit
7363318f6e
2 changed files with 8 additions and 4 deletions
|
|
@ -155,6 +155,6 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
|
|||
|
||||
public static function isInMemory(string $name): bool
|
||||
{
|
||||
return $name === ':memory:' || str_contains($name, '_tenancy_inmemory_');
|
||||
return $name === ':memory:' || str_starts_with($name, 'file:_tenancy_inmemory_');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue