1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-02 08:58:33 +03:00

r8633: check for valid input to ejs_userAuth()

(This used to be commit 8e788ae3094220e5ea195cdf85abb6763a834abd)
This commit is contained in:
Andrew Tridgell 2005-07-20 05:41:29 +00:00 committed by Gerald (Jerry) Carter
parent 53ffd147bd
commit d6c20a5c8a

View File

@ -102,6 +102,11 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv)
domain = mprToString(mprGetProperty(argv[0], "domain", NULL));
remote_host = mprToString(mprGetProperty(argv[0], "rhost", NULL));
if (username == NULL || password == NULL || domain == NULL) {
mpr_Return(eid, mprCreateUndefinedVar());
return 0;
}
tmp_ctx = talloc_new(mprMemCtx());
auth = mprObject("auth");