From d6c20a5c8a50338535efcf41fb8cb1f8dcf87757 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Jul 2005 05:41:29 +0000 Subject: r8633: check for valid input to ejs_userAuth() (This used to be commit 8e788ae3094220e5ea195cdf85abb6763a834abd) --- source4/scripting/ejs/smbcalls_auth.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/scripting') diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c index 4739922e38..87d5327e04 100644 --- a/source4/scripting/ejs/smbcalls_auth.c +++ b/source4/scripting/ejs/smbcalls_auth.c @@ -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"); -- cgit