limit tokenfile in source

This commit is contained in:
shifengbin 2024-01-15 17:52:16 +08:00
parent 51acdccf26
commit 5bba48abd0
1 changed files with 1 additions and 0 deletions

View File

@ -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(':')