forked from pool/trytond
Accepting request 971012 from Application:ERP:GNUHealth:Factory
bugfix version OBS-URL: https://build.opensuse.org/request/show/971012 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/trytond?expand=0&rev=68
This commit is contained in:
commit
6f7defc7af
@ -1,52 +0,0 @@
|
|||||||
--- a/trytond/protocols/wrappers.py
|
|
||||||
+++ b/trytond/protocols/wrappers.py
|
|
||||||
@@ -12,7 +12,6 @@
|
|
||||||
from http import client as HTTPStatus
|
|
||||||
|
|
||||||
from werkzeug.wrappers import Request as _Request, Response
|
|
||||||
-from werkzeug.http import wsgi_to_bytes, bytes_to_wsgi
|
|
||||||
from werkzeug.datastructures import Authorization
|
|
||||||
from werkzeug.exceptions import abort, HTTPException
|
|
||||||
|
|
||||||
@@ -113,7 +112,8 @@
|
|
||||||
def parse_authorization_header(value):
|
|
||||||
if not value:
|
|
||||||
return
|
|
||||||
- value = wsgi_to_bytes(value)
|
|
||||||
+ if not isinstance(value, bytes):
|
|
||||||
+ value = value.encode('latin1')
|
|
||||||
try:
|
|
||||||
auth_type, auth_info = value.split(None, 1)
|
|
||||||
auth_type = auth_type.lower()
|
|
||||||
@@ -127,9 +127,9 @@
|
|
||||||
except Exception:
|
|
||||||
return
|
|
||||||
return Authorization('session', {
|
|
||||||
- 'username': bytes_to_wsgi(username),
|
|
||||||
+ 'username': username.decode("latin1"),
|
|
||||||
'userid': userid,
|
|
||||||
- 'session': bytes_to_wsgi(session),
|
|
||||||
+ 'session': session.decode("latin1"),
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
@@ -214,16 +214,16 @@
|
|
||||||
pool = Pool()
|
|
||||||
UserApplication = pool.get('res.user.application')
|
|
||||||
|
|
||||||
- authorization = wsgi_to_bytes(request.headers['Authorization'])
|
|
||||||
+ authorization = request.headers['Authorization']
|
|
||||||
try:
|
|
||||||
auth_type, auth_info = authorization.split(None, 1)
|
|
||||||
auth_type = auth_type.lower()
|
|
||||||
except ValueError:
|
|
||||||
abort(HTTPStatus.UNAUTHORIZED)
|
|
||||||
- if auth_type != b'bearer':
|
|
||||||
+ if auth_type != 'bearer':
|
|
||||||
abort(HTTPStatus.FORBIDDEN)
|
|
||||||
|
|
||||||
- application = UserApplication.check(bytes_to_wsgi(auth_info), name)
|
|
||||||
+ application = UserApplication.check(auth_info, name)
|
|
||||||
if not application:
|
|
||||||
abort(HTTPStatus.FORBIDDEN)
|
|
||||||
transaction = Transaction()
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ce268bdedb064fddc372111105bca3398e29ba865d474a39b6c51a7f647add74
|
|
||||||
size 852998
|
|
@ -1,12 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v2
|
|
||||||
|
|
||||||
iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmIeZEQACgkQV09u/05H
|
|
||||||
dReYnAf/RB4xHXSexCK7Fr6z5T5l1B07hM6nZJiNvexG3xlQ5Xo/KuAt//2ytJ7D
|
|
||||||
Nh+JXLC+yQpQtKcw6fHqVxTxEVXgFzKzdRbLdIZ4+jBIaDgRvbL0WcE8tG0oqHGB
|
|
||||||
v/R/17/122qFC042ILa8gi7MM6wD47Uc8bpdcLeoowHrpwEvc7rjVPeWTAlKIs4h
|
|
||||||
JcsdSp2MjEc912myZ6vDoh2UoaglaRRS3R4Z4Ik8YCEck1+kOoBaX/vlsTnnO85F
|
|
||||||
rcB6FINSSvEkia49olDgDPXpwjCD0hH2cG2tIinMj6dw69Gzhy6o3IrEveT3LfiB
|
|
||||||
Xxkye4s8sqAUdRYeBQ7UGRq4jXBMJw==
|
|
||||||
=Q4LH
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
trytond-6.0.17.tar.gz
Normal file
3
trytond-6.0.17.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:bcb5828e5b050caed32a1058208bf00cbf417c315ea4f6f707702cf648c53618
|
||||||
|
size 852503
|
12
trytond-6.0.17.tar.gz.asc
Normal file
12
trytond-6.0.17.tar.gz.asc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2
|
||||||
|
|
||||||
|
iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmJZxQgACgkQV09u/05H
|
||||||
|
dRc21Qf/RKwOgwsbFRyZZRIMko0asSu+F63YGUC7qr6lXo8Bqb9A736Rd7FRDcnF
|
||||||
|
9/LKLqIral6fNNvb4mRsAbetxrMBFV3BeXGljeN35YBi7+9AjYDUCesLrEHT7qcQ
|
||||||
|
yyiC8GNqhe6f3sCzgifaRxBRh5d8mCqr5MMb/20aqw/ePL9h1awi0r4gwHzoRIQH
|
||||||
|
ko2HRVHMtYrY6BEKk62aVtcvn0C9tT9WaWIBoSck2Olj7LSzx4Wt5x83R3/y/Fnm
|
||||||
|
t0b0F3KvJN54FZnb3XHG9G/4tm0DVmxopcFs3JKdMNhCztWJSKiMDzvD+ImAuXPG
|
||||||
|
Uia4W85O0yXVyNG5l1DEhxOH4KO0Nw==
|
||||||
|
=q0Ie
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 18 19:25:02 UTC 2022 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- Version 6.0.17
|
||||||
|
* Werkzeug 2.0 compatibility added
|
||||||
|
* fix_werkzeug_2.x.patch removed
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 7 14:27:27 UTC 2022 - Axel Braun <axel.braun@gmx.de>
|
Mon Mar 7 14:27:27 UTC 2022 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
11
trytond.spec
11
trytond.spec
@ -20,7 +20,7 @@
|
|||||||
%define majorver 6.0
|
%define majorver 6.0
|
||||||
%define base_name tryton
|
%define base_name tryton
|
||||||
Name: trytond
|
Name: trytond
|
||||||
Version: %{majorver}.16
|
Version: %{majorver}.17
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: An Enterprise Resource Planning (ERP) system
|
Summary: An Enterprise Resource Planning (ERP) system
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@ -34,8 +34,7 @@ Source5: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.g
|
|||||||
Source6: https://keybase.io/cedrickrier/pgp_keys.asc?fingerprint=7C5A4360F6DF81ABA91FD54D6FF50AFE03489130#/%{name}.keyring
|
Source6: https://keybase.io/cedrickrier/pgp_keys.asc?fingerprint=7C5A4360F6DF81ABA91FD54D6FF50AFE03489130#/%{name}.keyring
|
||||||
Source7: openSUSE-trytond-setup
|
Source7: openSUSE-trytond-setup
|
||||||
Source20: %{name}.service
|
Source20: %{name}.service
|
||||||
Patch0: fix_werkzeug_2.x.patch
|
Patch0: Update_changed_fields_6.0.diff
|
||||||
Patch1: Update_changed_fields_6.0.diff
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python3-Werkzeug
|
BuildRequires: python3-Werkzeug
|
||||||
BuildRequires: python3-bcrypt
|
BuildRequires: python3-bcrypt
|
||||||
@ -85,13 +84,7 @@ security.
|
|||||||
%setup -q
|
%setup -q
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
#Werkzeug2 is not compatible with Werkzeug 1.x, so we need a conditional patch
|
|
||||||
echo 0%{?suse_version}
|
|
||||||
%if 0%{?suse_version} >= 1550
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%endif
|
|
||||||
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python3_build
|
%python3_build
|
||||||
|
Loading…
Reference in New Issue
Block a user