aboutsummaryrefslogtreecommitdiff
path: root/src/Authorisation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authorisation.c')
-rw-r--r--src/Authorisation.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Authorisation.c b/src/Authorisation.c
index 883dff8..92a6a27 100644
--- a/src/Authorisation.c
+++ b/src/Authorisation.c
@@ -156,7 +156,9 @@ int HTTP_AuthAddUser(const char *database,
@@*/
int HTTP_AuthenticateBasic(httpRequest *request,
- const char *database)
+ const char *database,
+ char *user,
+ int length)
{
int retval;
char message[1024];
@@ -203,6 +205,10 @@ int HTTP_AuthenticateBasic(httpRequest *request,
password++;
authorised = VerifyPassword(database, decoded, password);
+ if(user && strlen(user) < decoded_size)
+ {
+ sprintf(user,"%s", decoded);
+ }
}
}
}