From 4d19119c711dcb44c486ddae9ec56d87dedb29e2 Mon Sep 17 00:00:00 2001 From: Ali Maktabi Date: Sat, 26 Oct 2024 17:20:40 +0330 Subject: [PATCH] removed telegram ip safelist validation --- telegram/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/telegram/views.py b/telegram/views.py index caff1b4..df8d793 100644 --- a/telegram/views.py +++ b/telegram/views.py @@ -34,13 +34,13 @@ def get_telegram_safe_ips(): @csrf_exempt def telebot_respond(request): - client_ip = request.META["REMOTE_ADDR"] + # client_ip = request.META["REMOTE_ADDR"] - telegram_ips = get_telegram_safe_ips + # telegram_ips = get_telegram_safe_ips - # Validate the request's IP address against Telegram's IP ranges - if client_ip not in telegram_ips: - raise PermissionDenied("Invalid IP address") + # # Validate the request's IP address against Telegram's IP ranges + # if client_ip not in telegram_ips: + # raise PermissionDenied("Invalid IP address") if ( request.headers.get("X-Telegram-Bot-Api-Secret-Token")