mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 12:37:16 +02:00
Merge pull request #2563 from GulliblePsychologist/issue-2562
Webclient authentication sometimes fails (fixes #2562)
This commit is contained in:
commit
8d5b48d4cc
1 changed files with 2 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ class WebSocketClient(WebSocketServerProtocol, _BASE_SESSION_CLASS):
|
|||
|
||||
# nonce value, used to prevent the webclient from erasing the
|
||||
# webclient_authenticated_uid value of csession on disconnect
|
||||
nonce = None
|
||||
nonce = 0
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
|
@ -143,7 +143,7 @@ class WebSocketClient(WebSocketServerProtocol, _BASE_SESSION_CLASS):
|
|||
# set *before* this disconnect (disconnect called after a new client
|
||||
# connects, which occurs in some 'fast' browsers like Google Chrome
|
||||
# and Mobile Safari)
|
||||
if csession.get("webclient_authenticated_nonce", None) == self.nonce:
|
||||
if csession.get("webclient_authenticated_nonce", 0) == self.nonce:
|
||||
csession["webclient_authenticated_uid"] = None
|
||||
csession["webclient_authenticated_nonce"] = 0
|
||||
csession.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue