r8633: check for valid input to ejs_userAuth()
authorAndrew Tridgell <tridge@samba.org>
Wed, 20 Jul 2005 05:41:29 +0000 (05:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:29:46 +0000 (13:29 -0500)
(This used to be commit 8e788ae3094220e5ea195cdf85abb6763a834abd)

source4/scripting/ejs/smbcalls_auth.c

index 4739922e38c69790d34c10e401c14c54accb0257..87d5327e04f2c7c19af34c51d2f1bf3aa6d2caba 100644 (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");