infobyte / faraday

Open Source Vulnerability Management Platform

Home Page:https://www.faradaysec.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with flask_login version 0.6.2?

sbrun opened this issue · comments

Issue Type

  • Bug Report

Faraday version

Found in version 4.2.0 but reproduced it with version 4.1.0 (other versions not tested)

Steps to reproduce

I worked on the update of the package for Kali. During the build we run the tests and we have a lot of tests failure (784 failed) with the latest flask_login version 0.6.2 provided by Debian.

Debugging tracebacks (current results)

It's just one of the failures:

_____________ ERROR at setup of TestAgentAPIGeneric.test_run_fails _____________

logged_user = <User: test>
test_client = <CustomClient <CustomFlask 'faraday.server.app'>>

    @pytest.fixture
    def csrf_token(logged_user, test_client):
        session_response = test_client.get('/session')
>       return session_response.json.get('csrf_token')
E       AttributeError: 'NoneType' object has no attribute 'get'

tests/conftest.py:303: AttributeError
_ ERROR at setup of TestAgentAPIGeneric.test_run_agent_invalid_missing_executor_data _

logged_user = <User: test>
test_client = <CustomClient <CustomFlask 'faraday.server.app'>>

    @pytest.fixture
    def csrf_token(logged_user, test_client):
        session_response = test_client.get('/session')
>       return session_response.json.get('csrf_token')
E       AttributeError: 'NoneType' object has no attribute 'get'

tests/conftest.py:303: AttributeError

Reports/Extra data

If I use the "old" version 0.5.0 of flask_login, all the tests passed.

@sbrun Hello, yes with 0.6.2 the app works (in fact we are using it) but the tests fail.

You need to update to 0.6.2?

Thanks for your confirmation. I was able to run faraday with flask_login version 0.6.2 but as the tests failed I thought there could be other issues.
I embedded the "old" version of flask_login in the package to avoid the issue so I don't need to update it right now but it would be great to update it soon.