修正注册时可能造成的信息泄漏

This commit is contained in:
祁宁 2014-03-11 15:43:31 +08:00
parent a4f93e0231
commit bde86574b8
3 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ class Widget_Login extends Widget_Abstract_Users implements Widget_Interface_Do
$this->response->redirect($this->request->referer);
} else if (!$this->user->pass('contributor', true)) {
/** 不允许普通用户直接跳转后台 */
$this->response->redirect($this->options->siteUrl);
$this->response->redirect($this->options->profileUrl);
} else {
$this->response->redirect($this->options->adminUrl);
}

View File

@ -79,6 +79,6 @@ class Widget_Register extends Widget_Abstract_Users implements Widget_Interface_
Typecho_Cookie::delete('__typecho_remember_mail');
$this->widget('Widget_Notice')->set(_t('用户 <strong>%s</strong> 已经成功注册, 密码为 <strong>%s</strong>', $this->screenName, $generatedPassword), 'success');
$this->response->goBack();
$this->response->redirect($this->options->adminUrl);
}
}

View File

@ -125,9 +125,9 @@ class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interfac
$form->addInput($url);
/** 用户组 */
$group = new Typecho_Widget_Helper_Form_Element_Select('group', array('visitor' => _t('访问者'),
'subscriber' => _t('关注者'), 'contributor' => _t('贡献者'), 'editor' => _t('编辑'), 'administrator' => _t('管理员')),
NULL, _t('用户组'), _t('不同的用户组拥有不同的权限.')
$group = new Typecho_Widget_Helper_Form_Element_Select('group', array('subscriber' => _t('关注者'),
'contributor' => _t('贡献者'), 'editor' => _t('编辑'), 'administrator' => _t('管理员')),
NULL, _t('用户组'), _t('不同的用户组拥有不同的权限.')
. '<br />' . _t('具体的权限分配表请<a href="http://docs.typecho.org/develop/acl">参考这里</a>.'));
$form->addInput($group);