The auth_basic() decorator doesn't use functools.wraps().
Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com>
This commit is contained in:
parent
4322cd7b03
commit
6ff6c07da6
24
0009-Fix-for-Issue-586.patch
Normal file
24
0009-Fix-for-Issue-586.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From e1be22df61b9d545b7af3d8990603f4782eecced Mon Sep 17 00:00:00 2001
|
||||
From: Alice Goldfuss <alice@newrelic.com>
|
||||
Date: Tue, 11 Feb 2014 17:14:26 -0800
|
||||
Subject: [PATCH] Fix for Issue #586
|
||||
|
||||
---
|
||||
bottle.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/bottle.py b/bottle.py
|
||||
index 406762f..04ccf7d 100644
|
||||
--- a/bottle.py
|
||||
+++ b/bottle.py
|
||||
@@ -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):
|
||||
--
|
||||
2.39.0.windows.2
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: python-bottle
|
||||
Version: 0.12.13
|
||||
Release: 17
|
||||
Release: 18
|
||||
Summary: WSGI micro web-framework for Python.
|
||||
License: MIT
|
||||
URL: http://bottlepy.org
|
||||
@ -16,6 +16,7 @@ Patch0006: 0005-fix-1148-redirect-and-non-ascii-characters.patch
|
||||
Patch0007: 0006-1177-Bug-fix-of-missing-regex-escaped-back-slashes.patch
|
||||
Patch0008: 0007-Fix-the-Allow-header-value-in-405-Method-not-allowed.patch
|
||||
Patch0009: 0008-Fix-Multipart-file-uploads-with-empty-filename-not-d.patch
|
||||
Patch0010: 0009-Fix-for-Issue-586.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
||||
|
||||
@ -70,6 +71,9 @@ sed -i '/^#!/d' bottle.py
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 12 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-18
|
||||
- The auth_basic() decorator doesn't use functools.wraps().
|
||||
|
||||
* Fri Jan 05 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-17
|
||||
- Fix: Multipart file uploads with empty filename not detected as binary.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user