Pathauto and Global Redirect defaults expose usernames and more

Created on 26 April 2010, almost 15 years ago
Updated 10 April 2023, almost 2 years ago

With both Global Redirect and Pathauto modules installed with their respective default options, when a user enters http://example.com/user/[number] they are redirected to http://example.com/users/username instead. The page itself may display an "Access denied" error, but the username for the arbitrary account is exposed in the redirected URL.

By default, Pathauto creates URL aliases for each user account page. By default, Global Redirect does not check that a user has access to a given page before redirecting.

The same combination of module defaults can also expose titles of unpublished content:

  1. Create a page with the title "Secret announcement" but set the page to be unpublished.
  2. As an anonymous user, enter http://example.com/node/[node id created above] and you will get redirected to http://example.com/content/secret-announcement

With both Global Redirect and Pathauto listed in the SEO Checklist module, they're likely used in tandem on a lot of sites. That said, would it make sense to change the default setting for Menu Access Checking to "Enabled"? The help text for that field mentions avoiding "unexpected behaviour" but it's not clear what that behavior might be.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States Matt V.

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇰Denmark ressa Copenhagen

    ... would it make sense to change the default setting for Menu Access Checking to "Enabled"? The help text for that field mentions avoiding "unexpected behaviour" but it's not clear what that behavior might be.

    I agree with the original Issue Summary. I think Menu Access Checking should be enabled by default, to be on the safe side. If it's disabled, you can easily disclose the administrator user name:

    Go to /user/1 which redirects to /users/mysecretadminname

Production build 0.71.5 2024