From 27a09eaaab1d147ecad069a0d6645ad5c1c393c6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Aug 2005 02:12:21 +0000 Subject: [PATCH] r9501: fixed the SWAT login page for the changes to the userAuth() function that Mimir made earlier today (This used to be commit 10b1f95790f2769cdc0e1c6f051cb7cc73f07d69) --- swat/login.esp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/swat/login.esp b/swat/login.esp index 4b407939239..f263ef60776 100644 --- a/swat/login.esp +++ b/swat/login.esp @@ -22,13 +22,13 @@ f.display(); <% if (request.REQUEST_METHOD == "POST") { - var authinfo = new Object(); - authinfo.username = form.Username; - authinfo.password = form.Password; - authinfo.domain = form.Domain; - authinfo.rhost = request['REMOTE_HOST']; + var creds = credentials_init(); + creds.set_username(form.Username); + creds.set_password(form.Password); + creds.set_domain(form.Domain); + creds.set_workstation(request['REMOTE_HOST']); - auth = userAuth(authinfo); + auth = userAuth(creds); if (auth == undefined) { write("Invalid login - please try again
\n"); } else if (auth.result) { @@ -37,10 +37,7 @@ f.display(); session.authinfo.username = auth.username; session.authinfo.domain = auth.domain; - session.authinfo.credentials = credentials_init(); - session.authinfo.credentials.set_username(authinfo.username); - session.authinfo.credentials.set_domain(authinfo.domain); - session.authinfo.credentials.set_password(authinfo.password); + session.authinfo.credentials = creds; /* if the user was asking for the login page, then now redirect them to the main page. Otherwise just -- 2.34.1