Closed Bug 327289 Opened 19 years ago Closed 19 years ago

[PostgreSQL] SQL crash when a new user logs in for the first time using the 'Env' auth method

Categories

(Bugzilla :: User Accounts, defect)

2.20
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: clayton.oneill, Assigned: LpSolit)

References

Details

(Whiteboard: [blocker will fix])

Attachments

(2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: 2.20 When the Env.pm plugin is being used for authentication and Postgres is used as the database backend, new users get an error when Bugzilla tries to create their account. This appears to be because refreshed_when was added to the schema in 2.17.1. Reproducible: Always Steps to Reproduce: 1. Configure bugzilla to use postgresql as the database backend, and to use the Env.pm 2. Attempt to login as a user that is not in the profiles table. 3. Actual Results: Software error: DBD::Pg::st execute failed: ERROR: null value in column "refreshed_when" violates not-null constraint [for Statement "INSERT INTO profiles ( login_name, cryptpassword, realname, disabledtext ) VALUES ( ?, ?, ?, '' )" with ParamValues: 2='*', 1='coneill@twcable.com', 3='Test User'] at Bugzilla/Auth/Login/WWW/Env.pm line 123 Bugzilla::Auth::Login::WWW::Env::login('Bugzilla::Auth::Login::WWW::Env', 0) called at Bugzilla/Auth/Login/WWW.pm line 64 Bugzilla::Auth::Login::WWW::login('Bugzilla::Auth::Login::WWW', 0) called at Bugzilla.pm line 64 Bugzilla::login('Bugzilla', 0) called at /var/www/bugzilla/index.cgi line 41 For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error. Expected Results: Created the user's account and logged them in.
Attached patch Preliminary fix for this bug (obsolete) — Splinter Review
Confirmed!
Blocks: meta-pg
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking2.22?
Summary: Env.pm plugin doesn't create new user accounts correctly in Postgres → [PostgreSQL] SQL crash when a new user logs in for the first time using the 'Env' auth method
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.20
Attached patch patch, v1 (obsolete) — Splinter Review
Tested on 2.22rc1 with both MySQL and PostgreSQL.
Assignee: user-accounts → LpSolit
Attachment #211990 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #212009 - Flags: review?(bugreport)
Note that this patch doesn't apply cleanly on 2.20. And the right fix for 2.24 will be to fix bug 305941. 2.22 doesn't use the refreshed_when attribute anymore, but I think it's too late for a schema change.
Depends on: 327355
Whiteboard: [blocker will fix]
Comment on attachment 212009 [details] [diff] [review] patch, v1 r=joel if you've tested it.
Attachment #212009 - Flags: review?(bugreport) → review+
Actually, I don't want to commit this fix. Better is to let bug 327355 fix this one.
Fixed by blocker. The patch in this bug has NOT been committed!
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Flags: blocking2.22?
Resolution: --- → FIXED
Attachment #212009 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: