Changeset 96239 in webkit
- Timestamp:
- Sep 28, 2011 11:06:54 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96233 r96239 1 2011-09-28 Adam Barth <abarth@webkit.org> 2 3 CSP doesn't work for a wide variety of cases 4 https://bugs.webkit.org/show_bug.cgi?id=68921 5 6 Reviewed by Darin Adler. 7 8 Patch suggested by Sam Weinig. It's unclear to me how to test this 9 change because all our tests run on non-default ports, which is why we 10 have this bug in the first place. Mozilla uses a proxy while testing 11 so they can test with URLs like http://example.com, but we don't have 12 such a facility. 13 14 * page/ContentSecurityPolicy.cpp: 15 (WebCore::CSPSource::portMatches): 16 1 17 2011-09-28 Fady Samuel <fsamuel@chromium.org> 2 18 -
trunk/Source/WebCore/page/ContentSecurityPolicy.cpp
r95901 r96239 148 148 if (m_portHasWildcard) 149 149 return true; 150 150 151 int port = url.port(); 151 return port ? port == m_port : isDefaultPortForProtocol(m_port, url.protocol()); 152 153 if (port == m_port) 154 return true; 155 156 if (!port) 157 return isDefaultPortForProtocol(m_port, m_scheme); 158 159 if (!m_port) 160 return isDefaultPortForProtocol(port, m_scheme); 161 162 return false; 152 163 } 153 164
Note: See TracChangeset
for help on using the changeset viewer.