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 16, 2020
1 parent 42d4b9c commit 35244b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,8 +1431,8 @@ 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 )
return 1;
Expand Down

0 comments on commit 35244b5

Please sign in to comment.