Title: [253662] trunk/Source/WebCore
- Revision
- 253662
- Author
- [email protected]
- Date
- 2019-12-17 17:36:02 -0800 (Tue, 17 Dec 2019)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253661 => 253662)
--- trunk/Source/WebCore/ChangeLog 2019-12-18 01:32:40 UTC (rev 253661)
+++ trunk/Source/WebCore/ChangeLog 2019-12-18 01:36:02 UTC (rev 253662)
@@ -1,3 +1,15 @@
+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-17 Eric Carlson <[email protected]>
Add remote media player methods for prepareToPlay, preload, private browsing mode, preserves pitch, and failed to load
Modified: trunk/Source/WebCore/page/SecurityOrigin.cpp (253661 => 253662)
--- trunk/Source/WebCore/page/SecurityOrigin.cpp 2019-12-18 01:32:40 UTC (rev 253661)
+++ trunk/Source/WebCore/page/SecurityOrigin.cpp 2019-12-18 01:36:02 UTC (rev 253662)
@@ -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
@@ -46,6 +46,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
@@ -358,6 +360,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