Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[SinglePointLogin] fix passwordAuthenticate accessing $_POST superglobal #4356

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

xlecours
Copy link
Contributor

This remove the $_POST['username'] in favor of $username variable passed to the function as a parameter.

It fixes PHP Fatal error: Uncaught TypeError: Argument 1 passed to SinglePointLogin::accountLocked() must be of the type string, null given occurring because the API consumes 'application/json' content-type and $_POST is populated only;

[...] when using application/x-www-form-urlencoded or multipart/form-data as the HTTP Content-Type in the request.
http://php.net/manual/en/reserved.variables.post.php

@xlecours xlecours added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) API PR or issue introducing/requiring modifications to the API code [branch] minor labels Feb 21, 2019
@driusan driusan merged commit 8c57175 into aces:minor Feb 25, 2019
@ridz1208 ridz1208 added this to the 20.3.0 milestone Mar 14, 2019
kchatpar pushed a commit to kchatpar/Loris that referenced this pull request Apr 15, 2019
…bal (aces#4356)

This removes the $_POST['username'] in favor of $username variable passed to the function as a parameter.

It fixes `PHP Fatal error: Uncaught TypeError: Argument 1 passed to SinglePointLogin::accountLocked() must be of the type string, null given` occurring because the API consumes 'application/json' content-type and $_POST is populated only;

> [...] when using application/x-www-form-urlencoded or multipart/form-data as the HTTP Content-Type in the request.
> http://php.net/manual/en/reserved.variables.post.php
@xlecours xlecours deleted the fix_login_superglobal_access branch August 4, 2021 13:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
API PR or issue introducing/requiring modifications to the API code Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants