タグ

ブックマーク / www.milds.net (1)

  • cakephpのAuthのセキュリティを考える。。。 | Milds.net

    知っている方はもう対策済かもしれませんが、Authはデフォルトでは全フィールドをセッションに保存するようです。 で、フィールドの指定がないかソースを追ってみたところ、 $this->Auth->userScopeでconditionは指定できるようですが、どうも find(‘first)を行っているようでフィールドの指定が出来そうにない。。。 で、しょうがなく?Userモデルで対応することに。。。 function find($type, $params = array()) { switch ($type) { case 'first': $fields = array( 'fields'=>array('id','group_id','username') //必要なフィールドのみ指定 ); $params = am($fields,$params); return parent::f

  • 1