Closed Bug 340967 Opened 19 years ago Closed 19 years ago

The login form appears twice when trying to add an attachment (due to two consecutive calls to Bugzilla->login)

Categories

(Bugzilla :: User Accounts, defect, P1)

2.23
defect

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

(Keywords: regression)

Attachments

(1 file)

Go visit a bug while you are logged out. Click "Add a new attachment". It asks for your login and password. Give them. The footer is now correct, but it asks for your login and password again. Doesn't affect 2.22 nor 2.20.2. Tip only.
mkanat, could it be related to the Auth rewrite?
Yeah, I think the new login system doesn't expect Bugzilla->login to be called twice in the same page call. It would be ideal to just call it once, if we can.
Assignee: user-accounts → mkanat
Priority: -- → P1
I think the double login things happens as well for any URL that requires login, that you visit directly without been logged in previously.
Priority: P1 → --
Priority: -- → P1
Attached patch patch, v1Splinter Review
The problem with two consecutive Bugzilla->login() is that cookies created by the first one aren't immediately available for the second one (probably a CGI specific behavior). So we have to look at Bugzilla_cookie_list in order to get the newly created cookies. Note that I used a similar approach to Auth::Persist::Cookie::logout().
Assignee: mkanat → LpSolit
Status: NEW → ASSIGNED
Attachment #228076 - Flags: review?(mkanat)
Comment on attachment 228076 [details] [diff] [review] patch, v1 Let's just *always* use Bugzilla_cookie_list. Why not?
Attachment #228076 - Flags: review?(mkanat) → review-
Comment on attachment 228076 [details] [diff] [review] patch, v1 LpSolit really doesn't want to re-write this, and the code *does* look as though it should work. It fixes a regression, and that's important, so let's just go with it.
Attachment #228076 - Flags: review- → review+
Flags: approval?
Flags: approval? → approval+
Checking in Bugzilla/Auth/Login/Cookie.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Auth/Login/Cookie.pm,v <-- Cookie.pm new revision: 1.5; previous revision: 1.4 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Summary: The login form appears twice when trying to add an attachment → The login form appears twice when trying to add an attachment (due to two consecutive calls to Bugzilla->login)
Hum, weird. I can reproduce this bug again.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
OK, the reason of the problem was that I had an old cookie left in my cookie manager, and this confused Fx. Removing this old cookie fixes the problem. This problem seems to happen when you change 'cookiepath' from "/" to "/bugzilla/" as Bugzilla is unable to delete the login cookie which points to another path, but still detects the one set with "/".
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: