CYBEX-P / tahoe

A Cyberthreat Language (CTL) to replace STIX
Other
0 stars 1 forks source link

find_user() creates the user beforehand, resulting in always returning True #36

Closed nachobacanful closed 4 years ago

nachobacanful commented 4 years ago

https://github.com/CYBEX-P/tahoe/blob/258db1543c76e8f0bceccdf47d6cf00496fdbe6b/tahoe/identity/backend.py#L58 the above line creates a User in the mock backend, this is misspelled, therefore the mock backend never gets assigned, resulting in the creation of the User in the real backend. when the check is done if the user was not created it will be registered now.

Solution

        thisuser = tahoe.identity.User(email, _backend=tahoe.NoBackend())