Changeset 87713 in webkit


Ignore:
Timestamp:
May 30, 2011 11:28:58 PM (13 years ago)
Author:
koz@chromium.org
Message:

2011-05-30 James Kozianski <koz@chromium.org>

Reviewed by Kent Tamura.

[Chromium] Make isValidProtocol() accept protocols with '+'.
https://bugs.webkit.org/show_bug.cgi?id=61759

  • platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt: Added.
  • platform/chromium/fast/dom/register-protocol-handler-expected.txt: Added.

2011-05-30 James Kozianski <koz@chromium.org>

Reviewed by Kent Tamura.

[Chromium] Make isValidProtocol() accept protocols with '+'.
https://bugs.webkit.org/show_bug.cgi?id=61759

Also, detect syntax errors before security errors; some syntax errors
will also trigger a security error, but it's more helpful to the
programmer to know if they have a syntax error, which are well-defined
in the spec, rather than a security error, which aren't.

  • page/Navigator.cpp: (WebCore::Navigator::registerProtocolHandler): Detect syntax errors before security errors.
  • platform/KURLGoogle.cpp: (WebCore::isSchemeChar): Include '+' in the list of valid characters.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87709 r87713  
     12011-05-30  James Kozianski  <koz@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [Chromium] Make isValidProtocol() accept protocols with '+'.
     6        https://bugs.webkit.org/show_bug.cgi?id=61759
     7
     8        * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt: Added.
     9        * platform/chromium/fast/dom/register-protocol-handler-expected.txt: Added.
     10
    1112011-05-30  Andrey Petrov  <andrey.petrov@gmail.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r87709 r87713  
     12011-05-30  James Kozianski  <koz@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [Chromium] Make isValidProtocol() accept protocols with '+'.
     6        https://bugs.webkit.org/show_bug.cgi?id=61759
     7
     8        Also, detect syntax errors before security errors; some syntax errors
     9        will also trigger a security error, but it's more helpful to the
     10        programmer to know if they have a syntax error, which are well-defined
     11        in the spec, rather than a security error, which aren't.
     12
     13        * page/Navigator.cpp:
     14        (WebCore::Navigator::registerProtocolHandler):
     15        Detect syntax errors before security errors.
     16        * platform/KURLGoogle.cpp:
     17        (WebCore::isSchemeChar):
     18        Include '+' in the list of valid characters.
     19
    1202011-05-30  Andrey Petrov  <andrey.petrov@gmail.com>
    221
  • trunk/Source/WebCore/page/Navigator.cpp

    r87459 r87713  
    252252void Navigator::registerProtocolHandler(const String& scheme, const String& url, const String& title, ExceptionCode& ec)
    253253{
    254     if (!verifyProtocolHandlerScheme(scheme, ec))
    255         return;
    256 
    257254    if (!m_frame)
    258255        return;
     
    267264        return;
    268265
     266    if (!verifyProtocolHandlerScheme(scheme, ec))
     267        return;
     268
    269269    Page* page = m_frame->page();
    270270    if (!page)
  • trunk/Source/WebCore/platform/KURLGoogle.cpp

    r87623 r87713  
    131131static inline bool isSchemeChar(char c)
    132132{
    133     return isSchemeFirstChar(c) || (c >= '0' && c <= '9') || c == '.' || c == '-' || c == '*';
     133    return isSchemeFirstChar(c) || (c >= '0' && c <= '9') || c == '.' || c == '-' || c == '+';
    134134}
    135135
Note: See TracChangeset for help on using the changeset viewer.