Problem/Motivation

Customerror manages custom 404 pages, however there is a use case where the user login form should not be displayed for security reasons.

Proposed resolution

Either remove all code that adds a user login form to custom error 404 pages or introduce a setting to hide or show this form to maintain existing behavior.

User interface changes

Remove the user login form from custom error 404 pages.

Data model changes

None

Comments

squiggy created an issue. See original summary.

squiggy’s picture

StatusFileSize
new3.79 KB

Here's a patch that removes the login form.

Adding a setting would be better if this is a feature that anyone else is interested in.

squiggy’s picture

Issue summary: View changes
squiggy’s picture

Issue summary: View changes
gisle’s picture

Status: Active » Postponed (maintainer needs more info)

there is a use case where the user login form should not be displayed for security reasons.

What is the use case?

Anyone who know anything about Drupal knows how to display the login form as the anonymous user, so it hard to imagine a use case where exposing the login form is a vulnerability.

squiggy’s picture

You're right this is not a Drupal security vulnerability. The use case is specific to a particular website, and they don't want to show anonymous users the login form on 403 or 404 pages.

gisle’s picture

Status: Postponed (maintainer needs more info) » Needs work

I am not going to remove functionality from the project based on requirements of a single website.

I am willing to consider a well-written patch that introduces a setting to hide or show this form to maintain existing behaviour.

robloach’s picture

I agree a toggle setting would be the best option. Hoping we can get that added in the next iteration. In the mean time, here is a smaller diff that achieves the above patch's objective. Hope we can get a toggle option for it sometime soon.

Thanks for the attention here, gisle! Leaving as needs work.

robloach’s picture

StatusFileSize
new2.45 KB

Removed the LOGIN! text. Not quite a toggle yet.

loze’s picture

Title: Remove login form » Add toggle button to show login form on error pages
Status: Needs work » Needs review
StatusFileSize
new1.62 KB

This patch adds a toggle checkbox on the settings page to show the login form for each error type.

mlncn’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

  • mlncn committed 0656365 on 8.x-1.x authored by loze
    Issue #3241662 by RobLoach, squiggy, loze, gisle: Add toggle button to...
mlncn’s picture

Status: Reviewed & tested by the community » Fixed
mlncn’s picture

Small support request tacked on here… i suppose people here mostly wanted the login form gone, but is it fully working for anyone?

Once i removed any other login form blocks from the page (was including with https://www.drupal.org/project/http_client_error_status ) the actual logging in worked, but redirecting to the page i was trying to reach did not— i end up at, for example, /customerror/403?destination=/admin/content, but that destination parameter is not used.

Suppose this will have to be a feature request for this module, if it's not easier to do another way.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.