From b2f599e31b33176f909bbff9e2653b0f59af0a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20D=C3=ADaz=20Fau?= Date: Mon, 25 Feb 2019 09:35:22 +0100 Subject: [PATCH] Added 2 GlobalCEFApp properties to disable some security settings - Added GlobalCEFApp.AllowFileAccessFromFiles - Added GlobalCEFApp.AllowRunningInsecureContent --- source/uCEFApplication.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/uCEFApplication.pas b/source/uCEFApplication.pas index d2239e8a..dd79b64d 100644 --- a/source/uCEFApplication.pas +++ b/source/uCEFApplication.pas @@ -154,6 +154,8 @@ type FAutoplayPolicy : TCefAutoplayPolicy; FDisableBackgroundNetworking : boolean; FMetricsRecordingOnly : boolean; + FAllowFileAccessFromFiles : boolean; + FAllowRunningInsecureContent : boolean; FMustCreateResourceBundleHandler : boolean; FMustCreateBrowserProcessHandler : boolean; @@ -400,6 +402,8 @@ type property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy; property DisableBackgroundNetworking : boolean read FDisableBackgroundNetworking write FDisableBackgroundNetworking; property MetricsRecordingOnly : boolean read FMetricsRecordingOnly write FMetricsRecordingOnly; + property AllowFileAccessFromFiles : boolean read FAllowFileAccessFromFiles write FAllowFileAccessFromFiles; + property AllowRunningInsecureContent : boolean read FAllowRunningInsecureContent write FAllowRunningInsecureContent; property ChildProcessesCount : integer read GetChildProcessesCount; property UsedMemory : cardinal read GetUsedMemory; property TotalSystemMemory : uint64 read GetTotalSystemMemory; @@ -561,6 +565,8 @@ begin FAutoplayPolicy := appDefault; FDisableBackgroundNetworking := False; FMetricsRecordingOnly := False; + FAllowFileAccessFromFiles := False; + FAllowRunningInsecureContent := False; FMustCreateResourceBundleHandler := False; FMustCreateBrowserProcessHandler := True; @@ -1547,6 +1553,12 @@ begin if FMetricsRecordingOnly then commandLine.AppendSwitch('--metrics-recording-only'); + if FAllowFileAccessFromFiles then + commandLine.AppendSwitch('--allow-file-access-from-files'); + + if FAllowRunningInsecureContent then + commandLine.AppendSwitch('--allow-running-insecure-content'); + if (FCustomCommandLines <> nil) and (FCustomCommandLineValues <> nil) and (FCustomCommandLines.Count = FCustomCommandLineValues.Count) then