Skip to content

Commit

Permalink
Token ending with LF and no CR are valid
Browse files Browse the repository at this point in the history
  • Loading branch information
mullerch committed Jun 17, 2020
1 parent 42d4b9c commit 3afa2ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,12 +1431,12 @@ static int validateAuthToken (str_t s) {
if( p==s || c != ':' || p[0] != ' ' )
return 0;
s = ++p;
while( (c=*p++) != '\r' && c != 0 );
if( p==s || c==0 || p[0] != '\n' )
while( (c=*p++) != '\n' && c != 0 );
if( p==s || c==0 )
return 0;
if( p[1] == 0 )
if( p[0] == 0 )
return 1;
s = p = p+1; // next line
s = p; // next line
}
}

Expand Down

0 comments on commit 3afa2ee

Please sign in to comment.