@@ -40,7 +40,7 @@ def fillInVars(obj):
4040 for i in range (len (obj )):
4141 obj [i ] = fillInVars (obj [i ])
4242 elif isinstance (obj , str ):
43- matches = re .findall (r"\${(.*?)}" , obj )
43+ matches = re .findall (r"\${(.*?)}" , obj )
4444 for match in matches :
4545 if match in VARIABLES :
4646 value = VARIABLES [match ]
@@ -79,17 +79,17 @@ def middlewares():
7979 token = auth_header .split (" " , 1 )[1 ]
8080
8181 token = unquote (token )
82- if token != API_TOKEN :
82+ if token != API_TOKEN :
8383 infoLog (f"Client failed Bearer Auth [token: { token } ]" )
84- return UnauthorizedResponse ()
85- elif auth_header .startswith ("Basic " ):
86- try :
87- decoded = base64 .b64decode (auth_header .split (" " , 1 )[1 ]).decode ()
88- username , password = decoded .split (":" , 1 )
84+ return UnauthorizedResponse ()
85+ elif auth_header .startswith ("Basic " ):
86+ try :
87+ decoded = base64 .b64decode (auth_header .split (" " , 1 )[1 ]).decode ()
88+ username , password = decoded .split (":" , 1 )
8989
9090 username = unquote (username )
9191 password = unquote (password )
92- if username != "api" or password != API_TOKEN :
92+ if username != "api" or password != API_TOKEN :
9393 infoLog (f"Client failed Basic Auth [user: { username } , pw:{ password } ]" )
9494 return UnauthorizedResponse ()
9595 except Exception as error :
0 commit comments