mirror of
https://github.com/openmax-server/server.git
synced 2026-05-26 05:21:43 +03:00
Security + minor fixes (#16)
* implement ip rate limiting
* fix: secure генерация кода для входа
* fix: possible slowloris and dos attacks
* fix: убрать лишний импорт, не давать сообщения из чата незнакомцам, географически верные названия в дб...
* fix device name не использовался
* refactor: убрал лишние импорты
* refactor: вернул dotenv
* убрал импорт после c642434
This commit is contained in:
@@ -12,6 +12,7 @@ class Static:
|
||||
INVALID_TOKEN = "invalid_token"
|
||||
CHAT_NOT_FOUND = "chat_not_found"
|
||||
CHAT_NOT_ACCESS = "chat_not_access"
|
||||
RATE_LIMITED = "rate_limited"
|
||||
|
||||
class ChatTypes:
|
||||
DIALOG = "DIALOG"
|
||||
@@ -73,6 +74,12 @@ class Static:
|
||||
"error": "chat.not.access",
|
||||
"message": "Chat not access",
|
||||
"title": "Нет доступа к чату"
|
||||
},
|
||||
"rate_limited": {
|
||||
"localizedMessage": "Слишком много попыток. Повторите позже",
|
||||
"error": "error.rate_limited",
|
||||
"message": "Too many attempts. Please try again later",
|
||||
"title": "Слишком много попыток"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user