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

Password is destroyed when PowerAuthAuthentication is released by GC #607

Closed
hvge opened this issue Jul 25, 2024 · 1 comment · Fixed by #608
Closed

Password is destroyed when PowerAuthAuthentication is released by GC #607

hvge opened this issue Jul 25, 2024 · 1 comment · Fixed by #608
Assignees

Comments

@hvge
Copy link
Member

hvge commented Jul 25, 2024

If PowerAuthAuthentication object is being released by GC, then it also destroys assigned Password object. This is highly unwanted behavior, because the Password object instance might be referenced elsewhere in the application. That may lead to a random authentication failures as we encountered in #606

@hvge hvge self-assigned this Jul 25, 2024
@hvge
Copy link
Member Author

hvge commented Jul 25, 2024

After a deeper analysis I think that this will be triggered only if application is keeping its own Password object and try to sign two HTTP requests with the same password in a sequence. The second attempt may randomly fail on a mystic exception PowerAuthErrorException: Session is no longer valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant