php - Redirect loop when using Yii ip access rule -
using yii 1.1.15. want restrict login , logout actions ip rule. have inside controller:
public function accessrules() {     return [         [             'allow',             'actions' => ['index', 'error'],             'users' => ['*'],         ],         [             'allow',             'actions' => ['login'],             'users' => ['*'],             'ips' => ['xx.yy.zz.qq'],         ],         [             'allow',             'actions' => ['logout'],             'users' => ['@'],             'ips' => ['xx.yy.zz.qq'],         ],         [             'deny', // deny users             'users' => ['*'],         ],     ]; }   but when call login action in browser, browser enters redirect loop. if comment out ips rule, works.
what wrong above code?
this has proved bug exists in both 2.0 , 1.1 branches. it's been fixed in 2.0 branch (scheduled 2.0.1 milestone) , i've created pull request 1.1 branch.
the issue 2.0 branch @ https://github.com/yiisoft/yii2/issues/4889
Comments
Post a Comment