Last Comment Bug 1190693 - Backport bug 1175643 to bmo (Rewrite auth delegation to use a server-side POST instead of a client-side GET to delegate API Key)
: Backport bug 1175643 to bmo (Rewrite auth delegation to use a server-side POS...
Status: RESOLVED FIXED
:
Product: bugzilla.mozilla.org
Classification: Other
Component: General (show other bugs)
: Production
: Unspecified Unspecified
-- normal (vote)
: ---
Assigned To: Dylan Hardison [:dylan]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-03 20:17 PDT by Dylan Hardison [:dylan]
Modified: 2015-08-12 21:05 PDT (History)
4 users (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
1190693_1.patch (3.01 KB, patch)
2015-08-03 20:24 PDT, Dylan Hardison [:dylan]
dkl: review+
Details | Diff | Splinter Review

Description User image Dylan Hardison [:dylan] 2015-08-03 20:17:18 PDT
It does what it says on the tin
Comment 1 User image Dylan Hardison [:dylan] 2015-08-03 20:24:37 PDT
Created attachment 8642802 [details] [diff] [review]
1190693_1.patch

and here's the patch
Comment 2 User image David Lawrence [:dkl] 2015-08-10 21:24:44 PDT
Comment on attachment 8642802 [details] [diff] [review]
1190693_1.patch

Review of attachment 8642802 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl

::: auth.cgi
@@ +95,5 @@
> +    $ua->protocols_allowed(['http', 'https']);
> +    # If the URL of the proxy is given, use it, else get this information
> +    # from the environment variable.
> +    my $proxy_url = Bugzilla->params->{'proxy_url'};
> +    if ($proxy_url) {

nit:

if (my $proxy_url = Bugzilla->params->{'proxy_url'}) {
    $ua->proxy(['http', 'https'], $proxy_url);
}
else ...

@@ +112,5 @@
> +        eval {
> +            my $data = decode_json($resp->content);
> +            $callback_uri->query_param(callback_result => $data->{result});
> +        };
> +        if ($@) {

Nit: can shorten to
 
$@ && ThrowUserError('auth_delegation_json_error', { json_text => $resp->content });
print $cgi->redirect($callback_uri);
Comment 3 User image Dylan Hardison [:dylan] 2015-08-11 08:58:57 PDT
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   99bec2e..589ec37  master -> master

Note You need to log in before you can comment on or make changes to this bug.