From 5bba48abd083d5980efd44a7b4974ce316a2defc Mon Sep 17 00:00:00 2001 From: shifengbin Date: Mon, 15 Jan 2024 17:52:16 +0800 Subject: [PATCH] limit tokenfile in source --- websockify/token_plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/websockify/token_plugins.py b/websockify/token_plugins.py index a97c277..36a1dbc 100644 --- a/websockify/token_plugins.py +++ b/websockify/token_plugins.py @@ -75,6 +75,7 @@ class TokenFileName(BasePlugin): raise Exception("TokenFileName plugin requires a directory") def lookup(self, token): + token = os.path.basename(token) path = os.path.join(self.source, token) if os.path.exists(path): return open(path).read().strip().split(':')