Updated the login_required view decorator of the DigestAuth class, replaced writing to STDERR directly with warning through the Flask logger.

This commit is contained in:
依瑪貓 2023-05-03 08:05:28 +08:00
parent f04ea7ac18
commit 8e69733cf6

View File

@ -140,7 +140,7 @@ class DigestAuth:
return view(*args, **kwargs)
except UnauthorizedException as e:
if len(e.args) > 0:
sys.stderr.write(e.args[0] + "\n")
current_app.logger.warning(e.args[0])
response: Response = Response()
response.status = 401
response.headers["WWW-Authenticate"] \