Closed Bug 1159271 Opened 9 years ago Closed 9 years ago

Fix bugzilla create-login-cookie script

Categories

(MozReview Graveyard :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mdoglio, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

After the last bmo push, the create-login-cookie script is not able to login into bugzilla. The new csrf protection seems to be the root cause.
/r/7761 - mozreview: fix generate login cookie (Bug 1159271)

Pull down this commit:

hg pull -r c7bd9b42d71ace95057adfc0f11042301d584ac8 https://reviewboard-hg.mozilla.org/version-control-tools/
Attachment #8598687 - Flags: review?(gps)
Attachment #8598687 - Flags: review?(gps) → review+
Comment on attachment 8598687 [details]
MozReview Request: bz://1159271/mdoglio

https://reviewboard.mozilla.org/r/7759/#review6547

Fix the environment-specific references and land it.

::: testing/vcttesting/bugzilla/__init__.py:108
(Diff revision 1)
> -        cookies = dict(r.cookies)
> +        br.open('http://192.168.59.103:57973/')

br.open(self.base_url + '/')

::: testing/vcttesting/bugzilla/__init__.py:110
(Diff revision 1)
> -        params = {
> -            'Bugzilla_login': self.username,
> +        br.form['Bugzilla_login'] = 'mdoglio@mozilla.com'
> +        br.form['Bugzilla_password'] = 'password'

br.form['Bugzilla_login'] = self.username
br.form['Bugzilla_password'] = self.password
Comment on attachment 8598687 [details]
MozReview Request: bz://1159271/mdoglio

/r/7761 - mozreview: fix generate login cookie (Bug 1159271)

Pull down this commit:

hg pull -r 9e542064268b4a0962b33ebe4b1ee7c577c0579d https://reviewboard-hg.mozilla.org/version-control-tools/
Attachment #8598687 - Flags: review+ → review?(gps)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee: nobody → mdoglio
Attachment #8598687 - Flags: review?(gps) → review+
Attachment #8598687 - Attachment is obsolete: true
Attachment #8620179 - Flags: review+
This appears to be broken again, I'm still seeing failures in test-auth.t running from tip:

 Pushing using cookie auth works
 
   $ out=`bugzilla create-login-cookie`
+  [1]
   $ echo ${out}
+  Error running mach: ['create-login-cookie'] The error occurred in code that was called by the mach command. This is either a bug in the called code itself or in the way that mach is calling it. You should consider filing a bug for this issue. If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: AssertionError: Bugzilla_login cookie not found File "/home/dminor/src/version-control-tools/testing/vcttesting/bugzilla/mach_commands.py", line 104, in create_login_cookie login, cookie = self.b.create_login_cookie() File "/home/dminor/src/version-control-tools/testing/vcttesting/bugzilla/__init__.py", line 138, in create_login_cookie assert login, "Bugzilla_login cookie not found"
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This is a linux only failure, gps suggests it might be fixable by having docker listen on 127.0.0.1 instead of a unix domain socket.
Priority: -- → P3
Is this still valid?
Assignee: mdoglio → nobody
Who knows, we don't use cookies in test-auth.t anymore :)
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → WORKSFORME
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: