Skip to content

Commit

Permalink
Name and Password fields should be case sensitive in astmanproxy.users
Browse files Browse the repository at this point in the history
Do not use tolower() quite so freely to fix this.
  • Loading branch information
Steve Davies committed Jun 26, 2008
1 parent 4ee004f commit 3e65652
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/config_perms.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ void *add_userperm(char* username, char *userspec, struct proxy_user **pu) {
ccount++;
continue;
}
if( ccount > 0 )
*s = tolower(*s);
switch(ccount) {
case 0:
strncat(user->secret, s, 1);
Expand Down Expand Up @@ -81,8 +83,6 @@ void *processperm(char *s, struct proxy_user **pu) {
memset (value,0,sizeof value);

do {
*s = tolower(*s);

if ( *s == ' ' || *s == '\t')
continue;
if ( *s == ';' || *s == '#' || *s == '\r' || *s == '\n' )
Expand All @@ -91,9 +91,9 @@ void *processperm(char *s, struct proxy_user **pu) {
nvstate = 1;
continue;
}
if (!nvstate)
if (!nvstate) {
strncat(name, s, 1);
else
} else
strncat(value, s, 1);
} while (*(s++));

Expand Down

0 comments on commit 3e65652

Please sign in to comment.