Skip to content

Commit

Permalink
request.startswith() instead of first_word
Browse files Browse the repository at this point in the history
  • Loading branch information
troubadoour committed Oct 13, 2014
1 parent fd83493 commit 6792958
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions usr/lib/cpfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,8 @@ def handle_connection(sock):
break
# Strip escaped chars and white spaces at beginning and end of string
request = line.strip()
first_word = request.split(' ', 1)[0]

# Authentication request from Tor Browser.
if first_word == "AUTHENTICATE":
if request.startswith("AUTHENTICATE"):
# Don't check authentication, since only
# safe requests are allowed
writeh.write("250 OK\n")
Expand Down

0 comments on commit 6792958

Please sign in to comment.