Cross Origin iframes: Difference between revisions

From SWKLS WIKI
Jump to navigation Jump to search
(Created page with "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/featu...")
 
No edit summary
Line 10: Line 10:


https://stackoverflow.com/questions/68505281/chrome-suppressdifferentoriginsubframejsdialogs-setting-override-using-js
https://stackoverflow.com/questions/68505281/chrome-suppressdifferentoriginsubframejsdialogs-setting-override-using-js
We tried rolling out a shortcut for Chrome that included the SuppressDifferentOriginSubframeJSDialogs flag, but it did not work as expected.


Remove Shortcut
Remove Shortcut
Line 18: Line 21:
Remove-Item "$Desk\chrome temp fix.lnk" -Force
Remove-Item "$Desk\chrome temp fix.lnk" -Force
</syntaxhighlight>
</syntaxhighlight>
Ensure non-functioning shortcut is removed.


Check Folder Contents
Check Folder Contents
Line 32: Line 37:
</syntaxhighlight>
</syntaxhighlight>


For reference only, this did not work as expected.
<syntaxhighlight lang="powershell" line='line'>
#!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()
}
</syntaxhighlight>


[[Category:Windows]]
[[Category:Windows]]
[[Category:Verso]]
[[Category:Verso]]

Revision as of 13:30, 30 July 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


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

Set Registry Keys

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


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()
}