Skip to content

Commit fc269c6

Browse files
committed
fix(ui): show security warning for outdated MS OLE provider only once per application session
1 parent facff98 commit fc269c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/dbconnection.pas

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,8 @@ function mysql_authentication_dialog_ask(
10191019
exports
10201020
mysql_authentication_dialog_ask;
10211021

1022+
var
1023+
WarningShownOldOleProvider: Boolean = False;
10221024

10231025
{$I const.inc}
10241026

@@ -2716,13 +2718,14 @@ procedure TAdoDBConnection.SetActive(Value: Boolean);
27162718
end;
27172719

27182720
IsOldProvider := Parameters.LibraryOrProvider = 'SQLOLEDB';
2719-
if IsOldProvider then begin
2721+
if IsOldProvider and (not WarningShownOldOleProvider) then begin
27202722
MessageDialog(
27212723
f_('Security issue: Using %s %s with insecure %s.',
27222724
[Parameters.LibraryOrProvider, 'ADO provider', 'TLS 1.0']) +
27232725
f_('You should install %s from %s',
27242726
['Microsoft OLE DB Driver', 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=56730']),
27252727
mtWarning, [mbOK]);
2728+
WarningShownOldOleProvider := True;
27262729
end;
27272730

27282731
NetLib := '';

0 commit comments

Comments
 (0)