Fix: WLAN-SSID zeigte b'...' statt Klartext (psycopg bytes-vs-str)
Live gefunden beim echten Self-Service-Flow-Test: fetch_konfiguration() gab wifi_ssid roh weiter, ohne den bekannten bytes-Decode-Guard, den andere Stellen im Projekt schon haben (siehe auth.py:_row_to_user()). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
5b66974024
commit
117e03cd23
@ -33,6 +33,13 @@ def fetch_konfiguration(organization_id: str) -> dict | None:
|
|||||||
(wifi_ssid, wifi_psk_encrypted, bereitstellungsvorlage_id,
|
(wifi_ssid, wifi_psk_encrypted, bereitstellungsvorlage_id,
|
||||||
max_devices, validity_days, enrollment_session_id, iso_build_id) = row
|
max_devices, validity_days, enrollment_session_id, iso_build_id) = row
|
||||||
|
|
||||||
|
# psycopg liefert TEXT-Spalten hier teils als bytes zurueck, nicht str -
|
||||||
|
# dasselbe bekannte, nicht deterministische Verhalten wie in
|
||||||
|
# auth.py:_row_to_user() (live gefunden: b'...' erschien roh im
|
||||||
|
# WLAN-SSID-Feld auf /installationsmedium).
|
||||||
|
if isinstance(wifi_ssid, bytes):
|
||||||
|
wifi_ssid = wifi_ssid.decode("utf-8")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"wifi_ssid": wifi_ssid,
|
"wifi_ssid": wifi_ssid,
|
||||||
"hat_wifi_psk": wifi_psk_encrypted is not None,
|
"hat_wifi_psk": wifi_psk_encrypted is not None,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user