Explorar el Código

Fixing string splitting bug for names

Kirk Trombley hace 5 años
padre
commit
4a73d1490c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      server/game_api.py

+ 1 - 1
server/game_api.py

@@ -13,7 +13,7 @@ def require_name():
     name = request.headers.get("Authorization", type=str)
     if name is None:
         abort(401)
-    return name.split()[-1]
+    return name.split(maxsplit=1)[-1]
 
 
 def require_game(game_id):