Problem/Motivation
Drupal\Tests\basic_auth\Traits\BasicAuthTestTrait::basicAuthPostForm() has the following code:
protected function basicAuthPostForm($path, $edit, $submit, $username, $password, array $options = [], $form_html_id = NULL, $extra_post = NULL) {
return $this->drupalPostForm($path, $edit, $submit, $options, $this->getBasicAuthHeaders($username, $password), $form_html_id, $extra_post);
}
However the signature of drupalPostForm() is:
protected function drupalPostForm($path, $edit, $submit, array $options = [], $form_html_id = NULL) {
ie. the Authorization header is passed as the $form_html_id element, which will not work.
Steps to reproduce
Proposed resolution
The method is never called in core or contrib (no results at http://grep.xnddx.ru/search?text=basicAuthPostForm&filename= ) so I suggest just removing it.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3178273.patch | 1.76 KB | longwave |
Comments
Comment #2
longwaveComment #3
longwaveComment #4
joachim commentedLGTM.
Comment #5
alexpottYep this is broken code that we're not using. Will backport once the freeze is over.
Committed f60d258 and pushed to 9.2.x. Thanks!
Comment #7
alexpottBackported to 8.9.x because this is dead broken test code.