Commit 9560405f authored by Valentin Samir's avatar Valentin Samir

[tv] Token du proxy icecast dans secrets

parent c424bbb1
......@@ -8,6 +8,7 @@ import urllib
import hashlib
import datetime
import gestion.secrets_new as secrets
import tv.dns as tv_dns
import tv.radio.config as tv_config
#from gestion import config.dns
......@@ -144,7 +145,7 @@ def icecast_auth(request):
if POST["action"] == "listener_add":
ip=ipaddr.IPAddress(POST["ip"])
if str(ip) == "127.0.0.1":
if POST.get('ClientHeader.x-auth', '') != u'4b4cdb4fb7556214dea60b639845d2d5':
if POST.get('ClientHeader.x-auth', '') != secrets.get("icecast-token"):
# untrust proxy
return HttpResponseForbidden()
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment