RESOLVED FIXED213596
[GTK][WPE] Add webkit_authentication_request_get_security_origin
https://bugs.webkit.org/show_bug.cgi?id=213596
Summary [GTK][WPE] Add webkit_authentication_request_get_security_origin
Carlos Garcia Campos
Reported 2020-06-25 05:46:51 PDT
I'm not sure if we should deprecate get_port and get_host, they are convenient to avoid creating a security origin when you just want to get the host, for example.
Attachments
Patch (10.09 KB, patch)
2020-06-25 05:48 PDT, Carlos Garcia Campos
mcatanzaro: review+
Carlos Garcia Campos
Comment 1 2020-06-25 05:48:35 PDT
EWS Watchlist
Comment 2 2020-06-25 05:49:43 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Michael Catanzaro
Comment 3 2020-06-25 07:17:47 PDT
Comment on attachment 402727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402727&action=review > Source/WebKit/UIProcess/API/glib/WebKitAuthenticationRequest.cpp:368 > + return webkitSecurityOriginCreate(SecurityOrigin::create(protocol, protectionSpace.host(), protectionSpace.port())); You could ASSERT(!protocol.isEmpty()) here, just in case. webkitSecurityOriginCreate really will allow creating an invalid WebKitSecurityOrigin with empty protocol. > Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationRequest.h:30 > #include <webkit2/WebKitCredential.h> > +#include <webkit2/WebKitSecurityOrigin.h> > #include <webkit2/WebKitDefines.h> It's misalphabetized.
Carlos Garcia Campos
Comment 4 2020-06-29 00:38:12 PDT
(In reply to Michael Catanzaro from comment #3) > Comment on attachment 402727 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=402727&action=review > > > Source/WebKit/UIProcess/API/glib/WebKitAuthenticationRequest.cpp:368 > > + return webkitSecurityOriginCreate(SecurityOrigin::create(protocol, protectionSpace.host(), protectionSpace.port())); > > You could ASSERT(!protocol.isEmpty()) here, just in case. > webkitSecurityOriginCreate really will allow creating an invalid > WebKitSecurityOrigin with empty protocol. How can it be empty if it's set to a literal in a switch handling al possible cases? > > Source/WebKit/UIProcess/API/gtk/WebKitAuthenticationRequest.h:30 > > #include <webkit2/WebKitCredential.h> > > +#include <webkit2/WebKitSecurityOrigin.h> > > #include <webkit2/WebKitDefines.h> > > It's misalphabetized.
Carlos Garcia Campos
Comment 5 2020-06-29 00:39:44 PDT
Note You need to log in before you can comment on or make changes to this bug.