Skip to content

Commit

Permalink
Fix for Issue #586
Browse files Browse the repository at this point in the history
  • Loading branch information
alicegoldfuss authored and defnull committed Jul 7, 2021
1 parent ed32f36 commit e1be22d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2689,6 +2689,7 @@ def auth_basic(check, realm="private", text="Access denied"):
''' Callback decorator to require HTTP auth (basic).
TODO: Add route(check_auth=...) parameter. '''
def decorator(func):
@functools.wraps(func)
def wrapper(*a, **ka):
user, password = request.auth or (None, None)
if user is None or not check(user, password):
Expand Down

0 comments on commit e1be22d

Please sign in to comment.