0

我刚刚安装了 cakephp 2.6 的新实例,我面临的问题是它默认使用blowfish在创建/编辑时设置密码。

AppController我有 Auth 组件设置如下:

    'Auth'=>array(
                'loginRedirect'=>array('controller'=>'users', 'action'=>'index'),
                'logoutRedirect'=>array('controller'=>'users', 'action'=>'login'),
                'authError'=>"You are not authorized to access this page",
                'authorize'=>array('Controller'),       
                'authenticate' => array(
                    'Form' => array(
                        'fields' => array('username' => 'email'),
                        'passwordHasher' => array(
                            'className' => 'Simple',
                            'hashType' => 'sha1'
                        )
                ))
        )

当 hash 设置为 sha1 时会发生什么,在创建时它仍然将其散列为blowfish,但登录功能不再验证用户。

我也删除了所有temp数据。

我该如何修复它,以便密码始终使用 sha1?

4

0 回答 0