T
Size: a a a
T
.
F
F
tg
@router.post("/webhook/{secret}", dependencies=[Depends(telegram_webhook_security)])
async def telegram_webhook(
update_raw: Dict[str, Any] = Body(...)
) -> Response:
Bot.set_current(dispatcher.bot)
Dispatcher.set_current(dispatcher)
telegram_update = Update(**update_raw)
await dispatcher.process_update(telegram_update)
return Response(status_code=HTTP_200_OK)
tg
If the bad guy finds out the address of your webhook, then he can send fake "telegram updates" to your bot.
tg
tg
@app.post("/api/bot/{BOT_TOKEN}")
tg
@app.post("/api/bot/{BOT_TOKEN}")
DB
DB
DB
tg
DB
D
D
К
ЕП
ВТ