Serve: Use new get_service_certificate() to properly enforce privacy mode

This commit is contained in:
rlaphoenix 2022-09-10 21:25:56 +01:00
parent 768c4e7851
commit e8226f605c
1 changed files with 1 additions and 2 deletions

View File

@ -251,8 +251,7 @@ async def get_license_challenge(request: web.Request) -> web.Response:
}, status=400)
# enforce service certificate (opt-in)
# TODO: Add a way to check if there's a service certificate set properly
if request.app["config"].get("force_privacy_mode") and not cdm._Cdm__sessions[session_id].service_certificate:
if request.app["config"].get("force_privacy_mode") and not cdm.get_service_certificate(session_id):
return web.json_response({
"status": 403,
"message": "No Service Certificate set but Privacy Mode is Enforced."