Changeset 253662 in webkit


Ignore:
Timestamp:
Dec 17, 2019 5:36:02 PM (4 years ago)
Author:
Brent Fulgham
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r253657 r253662  
     12019-12-17  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Limit URL to reasonable size
     4        https://bugs.webkit.org/show_bug.cgi?id=203825
     5        <rdar://problem/56878680>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        * page/SecurityOrigin.cpp:
     10        (WebCore::SecurityOrigin::canDisplay const): Place an upper bound on the amount of
     11        memory a URL may consume.
     12
    1132019-12-17  Eric Carlson  <eric.carlson@apple.com>
    214
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r251887 r253662  
    11/*
    2  * Copyright (C) 2007-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4747namespace WebCore {
    4848
     49constexpr unsigned maximumURLSize = 0x8000;
     50
    4951static bool schemeRequiresHost(const URL& url)
    5052{
     
    359361        return true;
    360362
     363    if (url.pathEnd() > maximumURLSize)
     364        return false;
     365   
    361366#if !PLATFORM(IOS_FAMILY)
    362367    if (m_data.protocol == "file" && url.isLocalFile() && !FileSystem::filesHaveSameVolume(m_filePath, url.fileSystemPath()))
Note: See TracChangeset for help on using the changeset viewer.