<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi there,<br><div><br></div><div>I was looking at the file src/auth/basic/UserRequest.cc, in function Auth::Basic::UserRequest::module_direction:</div><div><br></div><div><br></div><div><div>    case Auth::Ok:</div><div>        if (user()->expiretime + static_cast<Auth::Basic::Config*>(Auth::SchemeConfig::Find("basic"))->credentialsTTL <= squid_curtime)</div><div>            return Auth::CRED_LOOKUP;</div><div>        return Auth::CRED_VALID;</div><div><br></div><div>    case Auth::Failed:</div><div>        return Auth::CRED_VALID;</div></div><div><br></div><div><br></div><div>I was a bit alarmed that if an auth fails, it returns Auth::CRED_VALID. </div><div>Why is CRED_ERROR or CRED_CHALLENGE not used here?</div><div><br></div><div>In negotiate and NTLM code, there is a note:</div><div>"XXX: really? not VALID or CHALLENGE?" when CRED_ERROR is returned.<br></div><div><br></div><div>Thankfully Squid doesn't really rely on this return value to determine whether a login is correct or not as it calls authenticateUserAuthenticated() which eventually checks credentials() == Auth::Ok. It all seems like quite a round-about method, however.</div><div><br></div><div>According to <a href="http://www.squid-cache.org/Doc/code/namespaceAuth.html?#afd721f7bc874e61ad0111999abf22a19a2d0cf49d6f94b0664c99dffb68cb4d5d">http://www.squid-cache.org/Doc/code/namespaceAuth.html?#afd721f7bc874e61ad0111999abf22a19a2d0cf49d6f94b0664c99dffb68cb4d5d</a> each of these calls should return CRED_CHALLENGE.</div><div><br></div><div>What are your thoughts on this? Should it be changed?</div><div><br></div><div>Cheers,</div><div>Josh</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>