Skip to content

Commit dbaeaf3

Browse files
committed
Whitelist ':memory:' special SQLite database
1 parent 0f26160 commit dbaeaf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/DatabaseLib/dwsSynSQLiteDatabase.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ constructor TdwsSynSQLiteDataBase.Create(const parameters : array of String; con
294294
FFileSystem := fileSystem;
295295
if Length(parameters) > 0 then begin
296296
dbName := TdwsDataBase.ApplyPathVariables(parameters[0]);
297-
if Assigned(fileSystem) then begin
297+
if (dbName <> ':memory:') and Assigned(fileSystem) then begin
298298
validatedDBName := fileSystem.ValidateFileName(dbName);
299299
if validatedDBName = '' then
300300
raise ESQLite3Exception.CreateFmt('Database location not allowed "%s"', [ dbName ])

0 commit comments

Comments
 (0)