Skip to content

Commit

Permalink
Whitelist ':memory:' special SQLite database
Browse files Browse the repository at this point in the history
  • Loading branch information
EricGrange committed Feb 26, 2021
1 parent 0f26160 commit dbaeaf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/DatabaseLib/dwsSynSQLiteDatabase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ constructor TdwsSynSQLiteDataBase.Create(const parameters : array of String; con
FFileSystem := fileSystem;
if Length(parameters) > 0 then begin
dbName := TdwsDataBase.ApplyPathVariables(parameters[0]);
if Assigned(fileSystem) then begin
if (dbName <> ':memory:') and Assigned(fileSystem) then begin
validatedDBName := fileSystem.ValidateFileName(dbName);
if validatedDBName = '' then
raise ESQLite3Exception.CreateFmt('Database location not allowed "%s"', [ dbName ])
Expand Down

0 comments on commit dbaeaf3

Please sign in to comment.