diff --git a/0009-Fix-for-Issue-586.patch b/0009-Fix-for-Issue-586.patch new file mode 100644 index 0000000000000000000000000000000000000000..c73588732eb6bc0ebbf6ba4f0c0d2777acc74d95 --- /dev/null +++ b/0009-Fix-for-Issue-586.patch @@ -0,0 +1,24 @@ +From e1be22df61b9d545b7af3d8990603f4782eecced Mon Sep 17 00:00:00 2001 +From: Alice Goldfuss +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 + diff --git a/python-bottle.spec b/python-bottle.spec index ad2ab194e31e721ba967e4016ffbb7f8fe86fe41..7902804eefad913ec1439b2d1a522c7abfacf8ee 100644 --- a/python-bottle.spec +++ b/python-bottle.spec @@ -1,6 +1,6 @@ Name: python-bottle Version: 0.12.13 -Release: 18 +Release: 19 Summary: WSGI micro web-framework for Python. License: MIT URL: https://github.com/bottlepy/bottle @@ -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: python3-devel python3-setuptools @@ -53,6 +54,9 @@ sed -i '/^#!/d' bottle.py %exclude %{_bindir}/bottle.py %changelog +* Fri Jan 12 2024 zhangliangpengkun - 0.12.13-19 +- The auth_basic() decorator doesn't use functools.wraps(). + * Fri Jan 05 2024 zhangliangpengkun - 0.12.13-18 - Fix: Multipart file uploads with empty filename not detected as binary.