Skip to content

Commit

Permalink
limit tokenfile in source
Browse files Browse the repository at this point in the history
  • Loading branch information
shifengbin committed Jan 15, 2024
1 parent 51acdcc commit 5bba48a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions websockify/token_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, src):
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(':')
Expand Down

0 comments on commit 5bba48a

Please sign in to comment.