Skip to content

Yii::$app->end() in yii2/filters/HostControl.denyAccess() is so hard to debug #20626

@ngbsoft

Description

@ngbsoft

First it swap host not allowed by NotFoundHttpException ('Page not found') which is very misleading in the log.
Then it makes things even harder for developer by calling Yii::$app->end(); , making catch block unusable. If this happens in production , it would take days to locate the issue.

I dunno, maybe :

  1. send access denied error instead of not found ?!?
  2. don't end the app, let the dev handle the exception themselves ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions