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

Hvac accepts a session that is not a requests Session #499

Open
surfer190 opened this issue Jul 15, 2019 · 1 comment
Open

Hvac accepts a session that is not a requests Session #499

surfer190 opened this issue Jul 15, 2019 · 1 comment

Comments

@surfer190
Copy link

This may be expected functionality, but you can send a dict as the session

Recreate with:

import hvac

session = {'hello': 'world'}
client = hvac.Client(session=session)

print(client.is_authenticated())

Version of hvac: hvac==0.9.3

Can we add a check to ensure that the session is an instance of requests.Session?

@jeffwecan
Copy link
Member

Yeah agreed that behavior is a bit funky. Adding a conditional to validate the correct class / parent class seems reasonable.

@jeffwecan jeffwecan added this to Needs triage in Bug / Feature Request Triage via automation Jul 15, 2019
@jeffwecan jeffwecan moved this from Needs triage to Low priority in Bug / Feature Request Triage Jul 15, 2019
@drewmullen drewmullen added the bug label Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants