Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 945262 Details for
Bug 1150988
fails to log in to Red Hat Bugzilla instance
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
authenticate: fix bugzilla.redhat.com issues (4.4.x)
0001-authenticate-fix-bugzilla.redhat.com-issues-4.4.x.patch (text/plain), 2.19 KB, created by
Laszlo Ersek
on 2014-10-09 11:27:26 UTC
(
hide
)
Description:
authenticate: fix bugzilla.redhat.com issues (4.4.x)
Filename:
MIME Type:
Creator:
Laszlo Ersek
Created:
2014-10-09 11:27:26 UTC
Size:
2.19 KB
patch
obsolete
>From eaefaf63be7f083b601505e20eb88e658f355a0b Mon Sep 17 00:00:00 2001 >From: Laszlo Ersek <lersek@redhat.com> >Date: Tue, 7 Oct 2014 12:40:13 +0200 >Subject: [PATCH] authenticate: fix bugzilla.redhat.com issues (4.4.x) > >There are two problems in the authenticate() subroutine. > >The first is that git-send-bugzilla sends a GET request, even though it >should send a POST. This is remedied by replacing "mech->submit" with the >more explicit "mech->submit_form", where the login button is explicitly >selected for clicking. > >The second problem is documented here: > >https://jira.almworks.com/browse/DZO-1189 > >Basically, the POST request for logging in must contain the valid >Bugzilla_login_token value that the initial GET returned. > >Unfortunately, the initial GET doesn't return such a Bugzilla_login_token >at all, because Bugzilla 4.4.x (erroneously) provides that only if the >initial GET contains Bugzilla_login_request_cookie. Since we don't do that >on the initial get, we receive no Bugzilla_login_token, and then the POST >request is rejected. > >This is fixed by sending the initial GET twice -- the first GET will makes >sure we set Bugzilla_login_request_cookie on the second, and the second >(now correct) GET makes sure that Bugzilla_login_token is set in the >response. We then reflect Bugzilla_login_token in the login POST request. > >Signed-off-by: Laszlo Ersek <lersek@redhat.com> >--- > git-send-bugzilla.pl | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/git-send-bugzilla.pl b/git-send-bugzilla.pl >index 219cdcc..98582c4 100755 >--- a/git-send-bugzilla.pl >+++ b/git-send-bugzilla.pl >@@ -42,10 +42,16 @@ sub authenticate { > $mech->get("$url?GoAheadAndLogIn=1"); > die "Can't fetch login form: ", $mech->res->status_line > unless $mech->success; >+ $mech->get("$url?GoAheadAndLogIn=1"); >+ >+ $mech->submit_form( >+ with_fields => { >+ Bugzilla_login => $username, >+ Bugzilla_password => $password >+ }, >+ button => "GoAheadAndLogIn" >+ ); > >- $mech->set_fields(Bugzilla_login => $username, >- Bugzilla_password => $password); >- $mech->submit; > die "Login submission failed: ", $mech->res->status_line > unless $mech->success; > die "Invalid login or password\n" if $mech->title =~ /Invalid/i; >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1150988
: 945262 |
945418