[Webkit-unassigned] [Bug 156086] New: CSP: Define explicitly datatype for nonce
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 31 15:16:39 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=156086
Bug ID: 156086
Summary: CSP: Define explicitly datatype for nonce
Classification: Unclassified
Product: WebKit
Version: WebKit Local Build
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dbates at webkit.org
Currently in the Content Security Policy code we represent nonces as String objects and have overloaded functions that take either a URL or a nonce. Notice that a URL object can be implicitly converted to a String object because the URL class defines a String conversion operator. This makes passing a nonce to an overloaded functions with default arguments that accepts either a URL or String in the same argument position error prone because the compiler may chose to implicitly convert a URL to a String and call the overloaded function for a nonce. One example of fragile function because of the implicit conversion of URL to String is the static non-member function checkFrameAncestors() (defined in file ContentSecurityPolicyDirectiveList.cpp): <http://trac.webkit.org/browser/trunk/Source/WebCore/page/csp/ContentSecurityPolicyDirectiveList.cpp?rev=198920#L79>. Care must be taken to update this call site should ContentSecurityPolicySourceListDirective ::allow(const URL&), <http://trac.web
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160331/8a9cc399/attachment.html>
More information about the webkit-unassigned
mailing list