Commit b712a735 authored by ghendricks%novell.com's avatar ghendricks%novell.com

Bug 380928 – Bugzilla::Auth::Verify::create_or_update_user can return stale Bugzilla::User object

patch by vrb@novell.com r=mkanat a=mkanat
parent 550e990b
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>bmo-tip</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.epic.perleditor.perlbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.epic.perleditor.perlnature</nature>
</natures>
</projectDescription>
......@@ -116,16 +116,15 @@ sub create_or_update_user {
validate_email_syntax($username)
|| return { failure => AUTH_ERROR, error => 'auth_invalid_email',
details => {addr => $username} };
$dbh->do('UPDATE profiles SET login_name = ? WHERE userid = ?',
undef, $username, $user->id);
$user->set_login($username);
}
if ($real_name && $user->name ne $real_name) {
# $real_name is more than likely tainted, but we only use it
# in a placeholder and we never use it after this.
trick_taint($real_name);
$dbh->do('UPDATE profiles SET realname = ? WHERE userid = ?',
undef, $real_name, $user->id);
$user->set_name($real_name);
}
$user->update();
return { user => $user };
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment