PathProcessor is using getUrlIfValidWithoutAccessCheck in isValidPath method

Created on 31 July 2018, over 6 years ago
Updated 16 February 2023, about 2 years ago

Recently I found that when checking if the path is valid PathProcessor uses getUrlIfValidWithoutAccessCheck.
If you check the documentation of PathValidatorInterface, it says:

Unlike getUrlIfValid(), access check is not performed. Do not use this method if the $path is about to be presented to a user.

I have a question why this method is being used instead of getUrlIfValid() that has access check? The module is expected to present the path to any user, including anonymous.

💬 Support request
Status

Postponed

Version

1.0

Component

Code

Created by

🇩🇪Germany a.dmitriiev

Live updates comments and jobs are added and updated live.
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.

  • 🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)

    Not access checking doesn't smell right to me. *but* I'm very not confident that it wouldn't have an unforeseen impact. I won't commit this without other people weighing in and testing various use cases manually. Have some automated tests for it other than just not breaking the existing tests would be ideal but that might not really be easy either.

Production build 0.71.5 2024