Closed Bug 1001497 Opened 11 years ago Closed 11 years ago

User.login returns id => 0 when the login or password is missing

Categories

(Bugzilla :: WebService, defect)

4.4.4
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

In Bugzilla 4.4.2 and older (including 4.2.x), when the login or password is missing or empty, an error is thrown: The username or password you entered is not valid. (error 300) But since 4.4.3, User.login returns id => 0 and no token. No error is thrown. Though being harmless, this is unexpected. This explains why some tests in webservice_user_login_logout.t fail. This is a regression due to bug 713926.
Flags: blocking4.4.5+
Attached patch patch, v1Splinter Review
The original code had !defined $foo, but I changed it to !$foo in the sec bug thinking the result would be the same, i.e. passing password= is the same as not passing the password at all. But this changes the way User.login behaves, so let's revert that.
Assignee: webservice → LpSolit
Status: NEW → ASSIGNED
Attachment #8412727 - Flags: review?(dkl)
Comment on attachment 8412727 [details] [diff] [review] patch, v1 Review of attachment 8412727 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8412727 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval4.4?
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 2033e6b..93477a7 master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 0381a0b..dc47bf8 4.4 -> 4.4
Status: ASSIGNED → RESOLVED
Closed: 11 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: