auth_ephemeral do_auth() function has this code:
ret = eph_auth_api.check_response(&cred->digest, _method, ha1); if (ret == AUTHENTICATED) { if (eph_auth_api.post_auth(_m, _h) != AUTHENTICATED) { return AUTH_ERROR; } } else if (ret == NOT_AUTHENTICATED) { return AUTH_INVALID_PASSWORD; } else { ret = AUTH_ERROR; }
return AUTH_OK;
i was wondering if there is a typo in 'ret = AUTH_ERROR'; statement. should it be 'return AUTH_ERROR;' instead?
-- juha
On 26/08/15 11:54, Juha Heinanen wrote:
auth_ephemeral do_auth() function has this code:
ret = eph_auth_api.check_response(&cred->digest, _method, ha1); if (ret == AUTHENTICATED) { if (eph_auth_api.post_auth(_m, _h) != AUTHENTICATED) { return AUTH_ERROR; } } else if (ret == NOT_AUTHENTICATED) { return AUTH_INVALID_PASSWORD; } else { ret = AUTH_ERROR; }
return AUTH_OK;
i was wondering if there is a typo in 'ret = AUTH_ERROR'; statement. should it be 'return AUTH_ERROR;' instead?
Looks like it should be a return, imo. I haven't checkd what other values eph_auth_api.check_response...) can return to see if the last else block needs other kind of handling.
Cheers, Daniel