passwordauth: avoid userinfo forgery via repeated email parameter
OVE-20170111-0001 (cherry picked from commit bffb71d6a7d28f6dd5f0be241f214e79eea7bb91)master
parent
3964787238
commit
b642cbef80
|
@ -332,8 +332,9 @@ sub formbuilder (@) {
|
||||||
IkiWiki::cgi_postsignin($cgi, $session);
|
IkiWiki::cgi_postsignin($cgi, $session);
|
||||||
}
|
}
|
||||||
elsif ($form->submitted eq 'Create Account') {
|
elsif ($form->submitted eq 'Create Account') {
|
||||||
|
my $email = $form->field('email');
|
||||||
if (IkiWiki::userinfo_setall($user_name, {
|
if (IkiWiki::userinfo_setall($user_name, {
|
||||||
'email' => $form->field('email'),
|
'email' => $email,
|
||||||
'regdate' => time})) {
|
'regdate' => time})) {
|
||||||
setpassword($user_name, $form->field('password'));
|
setpassword($user_name, $form->field('password'));
|
||||||
$form->field(name => "confirm_password", type => "hidden");
|
$form->field(name => "confirm_password", type => "hidden");
|
||||||
|
|
Loading…
Reference in New Issue