summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
Diffstat (limited to 'swat')
-rw-r--r--swat/login.esp7
1 files changed, 5 insertions, 2 deletions
diff --git a/swat/login.esp b/swat/login.esp
index f263ef6077..8d6c049d02 100644
--- a/swat/login.esp
+++ b/swat/login.esp
@@ -28,7 +28,7 @@ f.display();
creds.set_domain(form.Domain);
creds.set_workstation(request['REMOTE_HOST']);
- auth = userAuth(creds);
+ auth = userAuth(creds, request['REMOTE_SOCKET_ADDRESS']);
if (auth == undefined) {
write("<b>Invalid login - please try again<br /></b>\n");
} else if (auth.result) {
@@ -38,6 +38,7 @@ f.display();
session.authinfo.username = auth.username;
session.authinfo.domain = auth.domain;
session.authinfo.credentials = creds;
+ session.authinfo.session_info = auth.session_info;
/* if the user was asking for the login page, then now
redirect them to the main page. Otherwise just
@@ -48,8 +49,10 @@ f.display();
} else {
redirect(session_uri(request.REQUEST_URI));
}
- } else {
+ } else if (auth.report == undefined) {
write("<b>Login failed - please try again<br /></b>\n");
+ } else {
+ write("<b>Login failed: " + auth.report + " - please try again<br /></b>\n");
}
}
%>