Basic auth returns 403 when username & password supplied but not needed.

Created on 25 December 2016, over 8 years ago
Updated 27 April 2024, over 1 year ago

See Drupal\basic_auth\Authentication\Provider

  public function applies(Request $request) {
    $username = $request->headers->get('PHP_AUTH_USER');
    $password = $request->headers->get('PHP_AUTH_PW');
    return isset($username) && isset($password);
  }

This means that basic auth applies whenever the user submits a username and password. However my route has _access = TRUE and I've spent a long time wondering why that was overridden and I was still getting a 403.
Sure basic auth should apply according to some route parameter, not according to what the user does?

๐Ÿ› Bug report
Status

Postponed: needs info

Version

11.0 ๐Ÿ”ฅ

Component
Basic authย  โ†’

Last updated 22 days ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024