mirror of
https://github.com/pretix/pretix.git
synced 2026-11-19 02:46:04 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d78fb1a6bb | ||
|
|
ce850787f6 | ||
|
|
dd941ec9f8 | ||
|
|
0a19009743 |
No files matched your search
@@ -123,7 +123,7 @@ jobs:
|
||||
working-directory: ./src
|
||||
run: make all compress
|
||||
- name: Install Playwright browsers
|
||||
run: playwright install --with-deps
|
||||
run: playwright install chromium --with-deps
|
||||
- name: Run E2E tests
|
||||
working-directory: ./src
|
||||
run: PRETIX_CONFIG_FILE=tests/ci_postgres.cfg py.test tests/e2e/ -v --maxfail=10 --tracing=retain-on-failure
|
||||
|
||||
+5
-3
@@ -34,7 +34,7 @@ dependencies = [
|
||||
"celery==5.6.*",
|
||||
"chardet==5.2.*",
|
||||
"cryptography>=50.0.2",
|
||||
"css-inline==0.23.*",
|
||||
"css-inline==0.24.*",
|
||||
"defusedcsv>=3.0.0",
|
||||
"dnspython==2.9.*",
|
||||
"Django[argon2]==5.2.*,>=5.2.17",
|
||||
@@ -62,7 +62,7 @@ dependencies = [
|
||||
"geoip2==5.*",
|
||||
"isoweek",
|
||||
"jsonschema",
|
||||
"kombu==5.6.*",
|
||||
"kombu==5.7.*",
|
||||
"libsass==0.23.*",
|
||||
"lxml",
|
||||
"markdown==3.11.2",
|
||||
@@ -80,6 +80,7 @@ dependencies = [
|
||||
"psycopg2-binary",
|
||||
"pycountry",
|
||||
"pycparser==3.12",
|
||||
"pycryptodome==3.24.*",
|
||||
"pypdf==6.21.*",
|
||||
"python-bidi==0.6.*", # Support for Arabic in reportlab
|
||||
"python-dateutil==4.0.*",
|
||||
@@ -122,7 +123,8 @@ dev = [
|
||||
"pytest-sugar",
|
||||
"pytest-xdist==3.8.*",
|
||||
"pytest-playwright",
|
||||
"pytest==9.1.*",
|
||||
"pytest-base-url",
|
||||
"pytest==9.2.*",
|
||||
"playwright",
|
||||
"responses",
|
||||
"pypdfium2"
|
||||
|
||||
@@ -26,8 +26,7 @@ from binascii import unhexlify
|
||||
from datetime import timedelta
|
||||
from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
|
||||
from cryptography.hazmat.primitives.serialization import load_pem_public_key
|
||||
from Crypto.PublicKey import RSA
|
||||
from django.db import transaction
|
||||
from django.http import Http404, HttpResponse, JsonResponse
|
||||
from django.shortcuts import redirect, render
|
||||
@@ -499,9 +498,7 @@ class KeysView(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
privkey, pubkey = _get_or_create_server_keypair(request.organizer)
|
||||
kid = hashlib.sha256(pubkey.encode()).hexdigest()[:16]
|
||||
public_key = load_pem_public_key(pubkey.encode())
|
||||
assert isinstance(public_key, RSAPublicKey)
|
||||
public_numbers = public_key.public_numbers()
|
||||
pubkey = RSA.import_key(pubkey)
|
||||
|
||||
return JsonResponse({
|
||||
'keys': [
|
||||
@@ -510,8 +507,8 @@ class KeysView(View):
|
||||
'alg': 'RS256',
|
||||
'kid': kid,
|
||||
'use': 'sig',
|
||||
'e': self._encode_int(public_numbers.e).decode().rstrip("="),
|
||||
'n': self._encode_int(public_numbers.n).decode().rstrip("="),
|
||||
'e': self._encode_int(pubkey.e).decode().rstrip("="),
|
||||
'n': self._encode_int(pubkey.n).decode().rstrip("="),
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -30,10 +30,7 @@ from urllib.parse import quote
|
||||
import jwt
|
||||
import pytest
|
||||
from bs4 import BeautifulSoup
|
||||
from cryptography.hazmat.primitives.asymmetric.rsa import (
|
||||
RSAPublicKey, RSAPublicNumbers,
|
||||
)
|
||||
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
|
||||
from Crypto.PublicKey import RSA
|
||||
from django.utils.timezone import now
|
||||
from django_scopes import scopes_disabled
|
||||
from freezegun import freeze_time
|
||||
@@ -694,11 +691,6 @@ def test_keys_endpoint(env, client, ssoclient):
|
||||
|
||||
e = decode_int(data['keys'][0]['e'])
|
||||
n = decode_int(data['keys'][0]['n'])
|
||||
pubkey = RSAPublicNumbers(e, n).public_key()
|
||||
assert isinstance(pubkey, RSAPublicKey)
|
||||
|
||||
representation = pubkey.public_bytes(
|
||||
Encoding.PEM, PublicFormat.SubjectPublicKeyInfo
|
||||
).decode()
|
||||
|
||||
pubkey = RSA.construct((n, e))
|
||||
representation = pubkey.export_key('PEM').decode()
|
||||
assert representation.strip() == env[0].settings.sso_server_signing_key_rsa256_public.strip()
|
||||
Reference in new issue
Block a user