mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 608662 - fix X-Frame-Options crash when using external view-source editor, r=jst, a=blocking2.0
This commit is contained in:
parent
5e64baf9cf
commit
9e90c6afc8
@ -303,6 +303,10 @@ bool nsDSURIContentListener::CheckFrameOptions(nsIRequest* request)
|
||||
// document must be same-origin with top window. X-F-O: DENY requires that
|
||||
// the document must never be framed.
|
||||
nsCOMPtr<nsIDOMWindow> thisWindow = do_GetInterface(static_cast<nsIDocShell*>(mDocShell));
|
||||
// If we don't have DOMWindow there is no risk of clickjacking
|
||||
if (!thisWindow)
|
||||
return true;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> topWindow;
|
||||
thisWindow->GetTop(getter_AddRefs(topWindow));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user