Skip to content

Commit 7d913c3

Browse files
committed
Better handle missing oidc settings
1 parent 93c3824 commit 7d913c3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Better handle missing oidc settings
13+
1014
## [2.3.1] - 2025-08-24
1115

1216
### Fixed

pretix_oidc/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import time
3+
from configparser import NoOptionError, NoSectionError
34
from django.urls import reverse
45
from oic import rndstr
56
from oic.oic import Client
@@ -43,7 +44,7 @@ def __init__(self):
4344
self.client.redirect_uris = [None]
4445

4546
self.scopes = config.get("oidc", "scopes", fallback="openid").split(",")
46-
except KeyError:
47+
except (NoSectionError, NoOptionError):
4748
logger.error(
4849
"Please specify issuer, authorization_endpoint, token_endpoint, userinfo_endpoint, end_session_endpoint, jwks_uri, client_id and client_secret "
4950
"in [oidc] section in pretix.cfg"

0 commit comments

Comments
 (0)