comparison roundup/scripts/roundup_server.py @ 8210:4ed886dc2558

fix(web): issue2551381 - roundup-server parses multiple '?" incorrectly. Change 'rfind()' to 'find()' to locate the first unencoded/unescaped '?' in a URL. End the path component of the url at that point. This matches https://www.rfc-editor.org/rfc/rfc3986#section-3.4.
author John Rouillard <rouilj@ieee.org>
date Sun, 15 Dec 2024 00:36:19 -0500
parents bf4a5bd5aa9f
children 3a04ff6f1004
comparison
equal deleted inserted replaced
8209:9d2ad7386627 8210:4ed886dc2558
396 396
397 favicon_fileobj.close() 397 favicon_fileobj.close()
398 398
399 return 399 return
400 400
401 i = self.path.rfind('?') 401 i = self.path.find('?')
402 if i >= 0: 402 if i >= 0:
403 # rest starts with /, query is without ? 403 # rest starts with /, query is without ?
404 rest, query = self.path[:i], self.path[i+1:] 404 rest, query = self.path[:i], self.path[i+1:]
405 else: 405 else:
406 rest = self.path 406 rest = self.path

Roundup Issue Tracker: http://roundup-tracker.org/