packages/powerdns-admin: fix oidc userinfo bug

This commit is contained in:
Max Headroom 2023-06-09 19:56:29 +02:00
parent a6d0b92a54
commit dfd5e3306b
4 changed files with 17 additions and 0 deletions

View file

@ -6,6 +6,7 @@
in {
inherit (patched)
powerdns-admin
prometheus-jitsi-exporter
sssd
tempo

View file

@ -80,6 +80,8 @@ super: rec {
jre = jre17_standard;
};
powerdns-admin = patch super.powerdns-admin "patches/base/powerdns-admin";
prometheus-jitsi-exporter = patch super.prometheus-jitsi-exporter "patches/base/prometheus-jitsi-exporter";
tempo = (super.tempo.override { buildGoModule = super.buildGo119Module; }).overrideAttrs (_: {

View file

@ -5,6 +5,7 @@
hci = [ "x86_64-linux" ];
hydra = [ "x86_64-linux" ];
keycloak = [ "x86_64-linux" ];
powerdns-admin = [ "x86_64-linux" ];
prometheus-jitsi-exporter = [ "aarch64-linux" ];
searxng = [ "x86_64-linux" ];
tempo = [ "x86_64-linux" ];

View file

@ -0,0 +1,13 @@
diff --git a/powerdnsadmin/routes/index.py b/powerdnsadmin/routes/index.py
index 3a6f55c..417e05f 100644
--- a/powerdnsadmin/routes/index.py
+++ b/powerdnsadmin/routes/index.py
@@ -392,7 +392,7 @@ def login():
return authenticate_user(user, 'Azure OAuth')
if 'oidc_token' in session:
- user_data = json.loads(oidc.get('userinfo').text)
+ user_data = oidc.userinfo()
oidc_username = user_data[Setting().get('oidc_oauth_username')]
oidc_first_name = user_data[Setting().get('oidc_oauth_firstname')]
oidc_last_name = user_data[Setting().get('oidc_oauth_last_name')]