summaryrefslogtreecommitdiffstats
path: root/source/web/cgi.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-01 07:27:01 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-01 07:27:01 +0000
commit8485c51bc47f45a6263bda83a0bc3ba15abcd250 (patch)
treef667e98ccf94ba4a1fc9d3e733d907f842bf0c65 /source/web/cgi.c
parente9f56a157bd472914eebf64fde586104d8274717 (diff)
downloadsamba-8485c51bc47f45a6263bda83a0bc3ba15abcd250.tar.gz
samba-8485c51bc47f45a6263bda83a0bc3ba15abcd250.tar.xz
samba-8485c51bc47f45a6263bda83a0bc3ba15abcd250.zip
Merge from HEAD - convert username/password to unix before checking them in
SWAT.
Diffstat (limited to 'source/web/cgi.c')
-rw-r--r--source/web/cgi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/web/cgi.c b/source/web/cgi.c
index 35f32662833..46f33789bfc 100644
--- a/source/web/cgi.c
+++ b/source/web/cgi.c
@@ -297,7 +297,8 @@ handle a http authentication line
***************************************************************************/
static BOOL cgi_handle_authorization(char *line)
{
- char *p, *user, *user_pass;
+ char *p;
+ fstring user, user_pass;
struct passwd *pass = NULL;
if (strncasecmp(line,"Basic ", 6)) {
@@ -314,9 +315,15 @@ static BOOL cgi_handle_authorization(char *line)
goto err;
}
*p = 0;
- user = line;
- user_pass = p+1;
-
+
+ convert_string(CH_DISPLAY, CH_UNIX,
+ line, -1,
+ user, sizeof(user));
+
+ convert_string(CH_DISPLAY, CH_UNIX,
+ p+1, -1,
+ user_pass, sizeof(user_pass));
+
/*
* Try and get the user from the UNIX password file.
*/