You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The consumer should receive the User object associated with that username's high scores.
Actual Behavior
The library does not sanitize the username and directly passes in Lynx Titan (with a space) which results in an invalid URL.
Possible Solutions
self.username.replace(' ', '%A0')
Use a library to sanitize HTTP url
Stack Trace
user = Hiscores(userName)
..\..\appdata\local\programs\python\python38-32\lib\site-packages\OSRSBytes\Hiscores.py:106: in __init__
self._getHTTPResponse()
..\..\appdata\local\programs\python\python38-32\lib\site-packages\OSRSBytes\Hiscores.py:196: in _getHTTPResponse
conn.request("GET", "/m=hiscore_oldschool/index_lite.ws?player={}".format(self.username))
..\..\appdata\local\programs\python\python38-32\lib\http\client.py:1230: in request
self._send_request(method, url, body, headers, encode_chunked)
..\..\appdata\local\programs\python\python38-32\lib\http\client.py:1241: in _send_request
self.putrequest(method, url, **skips)
..\..\appdata\local\programs\python\python38-32\lib\http\client.py:1092: in putrequest
self._validate_path(url)
The text was updated successfully, but these errors were encountered:
Expected Behavior
The consumer is attempting to access a user with a space in their name
The consumer should receive the User object associated with that username's high scores.
Actual Behavior
The library does not sanitize the username and directly passes in
Lynx Titan
(with a space) which results in an invalid URL.Possible Solutions
Stack Trace
The text was updated successfully, but these errors were encountered: