File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -61,16 +61,24 @@ protected function _fail()
6161 {
6262 $ appName = \Yii::$ app ->name ;
6363
64+ $ user = \Yii::$ app ->request ->authUser ;
65+ $ password = \Yii::$ app ->request ->authPassword ;
66+ $ ip = \Yii::$ app ->request ->userIP ;
67+
68+
6469 if ($ this ->viewFail )
6570 {
6671 Header ("WWW-Authenticate: Basic realm= \"{$ appName }\"" );
6772 Header ("HTTP/1.0 401 Unauthorized " );
6873
74+ \Yii::error ("Fail http basic auth $ user@ $ password ( {$ ip }) " , self ::className ());
6975 echo \Yii::$ app ->view ->render ($ this ->viewFail );
7076 } else
7177 {
7278 Header ("WWW-Authenticate: Basic realm= \"{$ appName }\"" );
7379 Header ("HTTP/1.0 401 Unauthorized " );
80+
81+ \Yii::error ("Fail http basic auth $ user@ $ password ( {$ ip }) " , self ::className ());
7482 echo <<<HTML
7583 <style>
7684 .sx-title
You can’t perform that action at this time.
0 commit comments