Skip to content

Commit

Permalink
Remove client input from error messages (#250)
Browse files Browse the repository at this point in the history
Co-authored-by: André Carvalho <[email protected]>
  • Loading branch information
RedRoserade and RedRoserade authored Sep 28, 2021
1 parent c2603e9 commit 72b7136
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/engineio/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,7 @@ def handle_request(self, environ, start_response):
allowed_origins:
self._log_error_once(
origin + ' is not an accepted origin.', 'bad-origin')
r = self._bad_request(
origin + ' is not an accepted origin.')
r = self._bad_request('Not an accepted origin.')
start_response(r['status'], r['headers'])
return [r['response']]

Expand Down Expand Up @@ -381,11 +380,11 @@ def handle_request(self, environ, start_response):
else:
self._log_error_once('Invalid transport ' + transport,
'bad-transport')
r = self._bad_request('Invalid transport ' + transport)
r = self._bad_request('Invalid transport')
else:
if sid not in self.sockets:
self._log_error_once('Invalid session ' + sid, 'bad-sid')
r = self._bad_request('Invalid session ' + sid)
r = self._bad_request('Invalid session')
else:
socket = self._get_socket(sid)
try:
Expand All @@ -405,7 +404,7 @@ def handle_request(self, environ, start_response):
if sid is None or sid not in self.sockets:
self._log_error_once(
'Invalid session ' + (sid or 'None'), 'bad-sid')
r = self._bad_request('Invalid session ' + (sid or 'None'))
r = self._bad_request('Invalid session')
else:
socket = self._get_socket(sid)
try:
Expand Down

0 comments on commit 72b7136

Please sign in to comment.