Title: [253715] branches/safari-608-branch/Source/WebCore
- Revision
- 253715
- Author
- [email protected]
- Date
- 2019-12-18 13:44:01 -0800 (Wed, 18 Dec 2019)
Log Message
Cherry-pick r253662. rdar://problem/58049156
Limit URL to reasonable size
https://bugs.webkit.org/show_bug.cgi?id=203825
<rdar://problem/56878680>
Reviewed by Ryosuke Niwa.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canDisplay const): Place an upper bound on the amount of
memory a URL may consume.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (253714 => 253715)
--- branches/safari-608-branch/Source/WebCore/ChangeLog 2019-12-18 21:43:58 UTC (rev 253714)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog 2019-12-18 21:44:01 UTC (rev 253715)
@@ -1,5 +1,33 @@
2019-12-18 Dan Robson <[email protected]>
+ Cherry-pick r253662. rdar://problem/58049156
+
+ Limit URL to reasonable size
+ https://bugs.webkit.org/show_bug.cgi?id=203825
+ <rdar://problem/56878680>
+
+ Reviewed by Ryosuke Niwa.
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::canDisplay const): Place an upper bound on the amount of
+ memory a URL may consume.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-12-17 Brent Fulgham <[email protected]>
+
+ Limit URL to reasonable size
+ https://bugs.webkit.org/show_bug.cgi?id=203825
+ <rdar://problem/56878680>
+
+ Reviewed by Ryosuke Niwa.
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::canDisplay const): Place an upper bound on the amount of
+ memory a URL may consume.
+
+2019-12-18 Dan Robson <[email protected]>
+
Cherry-pick r253653. rdar://problem/58049166
Document::setFocusedElement should not set m_focusedElement to an element in another document
Modified: branches/safari-608-branch/Source/WebCore/page/SecurityOrigin.cpp (253714 => 253715)
--- branches/safari-608-branch/Source/WebCore/page/SecurityOrigin.cpp 2019-12-18 21:43:58 UTC (rev 253714)
+++ branches/safari-608-branch/Source/WebCore/page/SecurityOrigin.cpp 2019-12-18 21:44:01 UTC (rev 253715)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,6 +45,8 @@
namespace WebCore {
+constexpr unsigned maximumURLSize = 0x8000;
+
static bool schemeRequiresHost(const URL& url)
{
// We expect URLs with these schemes to have authority components. If the
@@ -356,6 +358,9 @@
if (m_universalAccess)
return true;
+ if (url.pathEnd() > maximumURLSize)
+ return false;
+
#if !PLATFORM(IOS_FAMILY)
if (m_data.protocol == "file" && url.isLocalFile() && !FileSystem::filesHaveSameVolume(m_filePath, url.fileSystemPath()))
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes