Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug] Exception when attempting to logout in vokuro #146

Open
phalcorine opened this issue Jan 5, 2020 · 0 comments
Open

[Bug] Exception when attempting to logout in vokuro #146

phalcorine opened this issue Jan 5, 2020 · 0 comments
Assignees

Comments

@phalcorine
Copy link

phalcorine commented Jan 5, 2020

Summary:
An exception occurs when attempting to logout from a valid user session. It is triggered clicking on the logout link from the site navbar or following the uri directly: 'session/logout'.

Details:
File (Directory) Path: src/Plugins/Auth/
File Name: Auth.php
Line Number: 264
Line Snippet:
$userId = $this->findFirstByToken($token);

Enclosing Method Name: remove

Problem: Attempting to logout from a valid user session is impossible due to an exception being rasied in the process. This happens as a result of calling the deleteToken() and passing the $userId variable as a parameter. If its 'set', its of the string data type. The deleteToken() method requires an one parameter of type: integer.

Suggested solution: This snippet, in line 264, could be changed from:

$userId = $this->findFirstByToken($token);

to:

$userId = (int) $this->findFirstByToken($token);

This is because strict_types are set to true and the call to the deleteToken() method, on line 266, while passing the $userId variable as a parameter will throw an error...

@Jeckerson Jeckerson self-assigned this Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants