Cross Origin iframes: Difference between revisions

From SWKLS WIKI
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
As of Chromium v92 -> Feature: Remove alert(), confirm(), and prompt for cross origin iframes. This causes issues in both VERSO and SHAREit
=====As of Chromium v92 -> Feature: Remove alert(), confirm(), and prompt for cross origin iframes. This causes issues in both VERSO and SHAREit====


https://www.chromestatus.com/feature/5148698084376576
https://www.chromestatus.com/feature/5148698084376576
Line 11: Line 11:
https://stackoverflow.com/questions/68505281/chrome-suppressdifferentoriginsubframejsdialogs-setting-override-using-js
https://stackoverflow.com/questions/68505281/chrome-suppressdifferentoriginsubframejsdialogs-setting-override-using-js


Update 8/3/2021: A-G has fixed issue, change reg edits to enable (default)


Enable (assuming Chrome Enterprise or Edge)
====Update 8/3/2021: A-G has fixed issue, change reg edits to enable (default)====
 
=====Enable (assuming Chrome Enterprise or Edge)=====
<syntaxhighlight lang="powershell" line='line'>
<syntaxhighlight lang="powershell" line='line'>
reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 1 /f
reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 1 /f
Line 20: Line 21:




Set Registry Keys (Disable) (assuming Chrome Enterprise or Edge)
=====Set Registry Keys (Disable) (assuming Chrome Enterprise or Edge)=====
<syntaxhighlight lang="powershell" line='line'>
<syntaxhighlight lang="powershell" line='line'>
reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 0
Line 28: Line 29:




Another option to run Chrome / Edge with special command. It is Suggested that Chrome be closed before performing the following steps
====Another option to run Chrome / Edge with special command. It is Suggested that Chrome be closed before performing the following steps====


# Open the RUN dialog box with By Pressing [WIndowsKey + R ]
# Open the RUN dialog box with By Pressing [WIndowsKey + R ]

Revision as of 13:35, 3 August 2021

=As of Chromium v92 -> Feature: Remove alert(), confirm(), and prompt for cross origin iframes. This causes issues in both VERSO and SHAREit

https://www.chromestatus.com/feature/5148698084376576

https://groups.google.com/a/chromium.org/g/blink-dev/c/VOePv--Qa-4/m/uoTP-h4-BAAJ?pli=1

https://bugs.chromium.org/p/chromium/issues/detail?id=1065085

https://chromeenterprise.google/policies/#SuppressDifferentOriginSubframeDialogs

https://stackoverflow.com/questions/68505281/chrome-suppressdifferentoriginsubframejsdialogs-setting-override-using-js


Update 8/3/2021: A-G has fixed issue, change reg edits to enable (default)

Enable (assuming Chrome Enterprise or Edge)
reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 1 /f
reg add HKLM\SOFTWARE\Policies\Microsoft\Edge /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 1 /f


Set Registry Keys (Disable) (assuming Chrome Enterprise or Edge)
reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 0
reg add HKLM\SOFTWARE\Policies\Microsoft\Edge /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 0


Another option to run Chrome / Edge with special command. It is Suggested that Chrome be closed before performing the following steps

  1. Open the RUN dialog box with By Pressing [WIndowsKey + R ]
  2. Copy and paste (or Type) the following command:
    1. For Chrome: "C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-features=SuppressDifferentOriginSubframeJSDialogs
    2. For Edge: "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --disable-features=SuppressDifferentOriginSubframeJSDialogs
  3. Press OK



We tried rolling out a shortcut for Chrome that included the SuppressDifferentOriginSubframeJSDialogs flag, but it did not work as expected. Remove Shortcut:

#!ps
#timeout=50000
$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
Remove-Item "$Desk\chrome temp fix.lnk" -Force

Ensure non-functioning shortcut is removed. Check Folder Contents:

#!ps
$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
Get-ChildItem -Path $Desk


For reference only, this did not work as expected.

#!ps
#timeout=50000
$googlefile = Test-Path "c:\program files (x86)\google\chrome\application\chrome.exe" -PathType Leaf
if ($googlefile -ne $true) {
	$WshShell = New-Object -comObject WScript.Shell
	$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
	$Shortcut = $WshShell.CreateShortcut("$Desk\chrome temp fix.lnk")
	$Shortcut.TargetPath = '"C:\Program Files\Google\Chrome\Application\chrome.exe"'
	$Shortcut.Arguments = '--disable-features="SuppressDifferentOriginSubframeJSDialogs"'
	$Shortcut.WorkingDirectory = 'C:\Program Files\Google\Chrome\Application'
	$Shortcut.Save()
} else {
	$WshShell = New-Object -comObject WScript.Shell
	$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
	$Shortcut = $WshShell.CreateShortcut("$Desk\chrome temp fix.lnk")
	$Shortcut.TargetPath = '"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"'
	$Shortcut.Arguments = '--disable-features="SuppressDifferentOriginSubframeJSDialogs"'
	$Shortcut.WorkingDirectory = 'C:\Program Files (x86)\Google\Chrome\Application'
	$Shortcut.Save()
}