add rar and zip to prohibited extensions

This commit is contained in:
mini_admin_bot 2025-06-18 12:35:34 +02:00
parent ca333d1964
commit b0e98d085a
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
use std::collections::LinkedList; use std::collections::LinkedList;
use std::fs;
use std::sync::RwLock; use std::sync::RwLock;
#[cfg(not(test))]
use std::fs;
#[cfg(not(debug_assertions))] #[cfg(not(debug_assertions))]
const ALLOW_PATH: &str = "/opt/mini_admin_bot/allow_users"; const ALLOW_PATH: &str = "/opt/mini_admin_bot/allow_users";

View File

@ -1,6 +1,6 @@
use teloxide::{prelude::*, types::Document}; use teloxide::{prelude::*, types::Document};
static EXTENSIONS: [&str; 4] = ["exe", "deb", "rpm", "apk"]; static EXTENSIONS: [&str; 6] = ["exe", "deb", "rpm", "apk", "zip", "rar"];
pub fn check_file(msg: Message) -> bool { pub fn check_file(msg: Message) -> bool {
match msg.document() { match msg.document() {