mirror of
https://github.com/friendica/friendica
synced 2024-11-18 17:03:41 +00:00
Fetch data from basic auth when one of the parameters is missing
This commit is contained in:
parent
2db935fae2
commit
575fb52438
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ class Token extends BaseApi
|
|||
$authorization = $_SERVER['REDIRECT_REMOTE_USER'] ?? '';
|
||||
}
|
||||
|
||||
if (empty($request['client_id']) && substr($authorization, 0, 6) == 'Basic ') {
|
||||
if ((empty($request['client_id']) || empty($request['client_secret'])) && substr($authorization, 0, 6) == 'Basic ') {
|
||||
// Per RFC2617, usernames can't contain a colon but password can,
|
||||
// so we cut on the first colon to obtain the username and the password
|
||||
// @see https://www.rfc-editor.org/rfc/rfc2617#section-2
|
||||
|
|
Loading…
Reference in a new issue