Compare commits

..

3 commits

Author SHA1 Message Date
Aleksei Sidorenko
4dc4777b17
Merge ee920322be into 96b8fe472c 2026-03-04 12:18:42 +01:00
Sanaei
ee920322be
Update web/service/tgbot.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-04 12:18:38 +01:00
Aleksei Sidorenko
96b8fe472c
Fix: escape HTML characters in tgbot start command (#3883) 2026-03-04 11:35:24 +01:00

View file

@ -8,6 +8,7 @@ import (
"encoding/json"
"errors"
"fmt"
"html"
"io"
"math/big"
"net"
@ -664,7 +665,7 @@ func (t *Tgbot) answerCommand(message *telego.Message, chatId int64, isAdmin boo
msg += t.I18nBot("tgbot.commands.help")
msg += t.I18nBot("tgbot.commands.pleaseChoose")
case "start":
msg += t.I18nBot("tgbot.commands.start", "Firstname=="+message.From.FirstName)
msg += t.I18nBot("tgbot.commands.start", "Firstname=="+html.EscapeString(message.From.FirstName))
if isAdmin {
msg += t.I18nBot("tgbot.commands.welcome", "Hostname=="+hostname)
}
@ -3402,7 +3403,7 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
network, _ := streamSettings["network"].(string)
security, _ := streamSettings["security"].(string)
// Строго: только TCP и только с TLS или REALITY
// Strict: only TCP and only with TLS or REALITY
if network == "tcp" && (security == "tls" || security == "reality") {
canUseFlow = true
}