Problem/Motivation

Navigating to admin/structure/block as an anonymous user exposes the user to the help text for the page. The text is not correctly pass to hook_help.

Proposed resolution

Clean up the route checking if statement condition. timplunkett suggests

if (in_array($route_name, array('block.admin_display', 'block.admin_display_theme'))) {

Add an access check to the condition as well.

User interface changes

None.

API changes

None.

Original report by @jessebeach

Comments

olli’s picture

I dont think this is only block module issue. The system help block should not be visible on 403/404. From SystemHelpBlock::getActiveHelp():

    $router_path = $request->attributes->get('_system_path');
    // We will always have a path unless we are on a 403 or 404.
    if (!$router_path) {
      return '';
    }
sidharthap’s picture

Status: Active » Needs review
StatusFileSize
new2.05 KB

There seems some more modules has the same issue. here is a small patch to fix only block module issue.

Status: Needs review » Needs work

The last submitted patch, 2: 214031515-2.patch, failed testing.

jessebeach’s picture

Status: Needs work » Needs review

2: 214031515-2.patch queued for re-testing.

olli’s picture

StatusFileSize
new675 bytes

Here is an alternative to fix the help block instead of block_help().

olli’s picture

Issue tags: +Blocks-Layouts
olli’s picture

olli’s picture

Status: Needs review » Closed (duplicate)