Page MenuHomeIn-Portal Phabricator

INP-1857 - Prevent recursion in the "\kUrlManager::show404" method
ClosedPublic

Authored by alex on Tue, May 27, 4:32 AM.

Details

Summary

Addresses the ability to show 404 Page Not Found pages from events, that wasn't covered in the D462.

Test Plan

Preparations

In IDE:

  1. open the /core/units/users/users_event_handler.php file for editing
  2. add protected function OnTestPageNotFound(kEvent $event) { $this->Application->UrlManager->show404(); } code after the \UsersEventHandler::mapPermissions method
  3. add the 'OnTestPageNotFound' => array('self' => true), element to the $permissions array of the \UsersEventHandler::mapPermissions method
  4. save changes

Test Plan

  1. repeat the test plan from the D462
  2. open the /platform/page-not-found.html?events[u]=OnTestPageNotFound URL on the Front-End
  3. confirm, that you're stayed on the page URL and seeing Page Not Found page

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Tue, May 27, 4:32 AM
alex requested review of this revision.Tue, May 27, 4:32 AM
erik accepted this revision.Tue, May 27, 6:00 AM
This revision is now accepted and ready to land.Tue, May 27, 6:00 AM
This revision was automatically updated to reflect the committed changes.