don't be too restrictive w/ blocking names

This commit is contained in:
2025-08-09 17:26:22 +02:00
parent 76e1c767ae
commit cf1866af69
2 changed files with 5 additions and 34 deletions

View File

@@ -1,19 +1,3 @@
🤩🍆💦
​🖕​🤬​🖕​
✊🍆
✊🍆💦
✊🍌
✊🍌💦
🍆🍑💦
🍆👅💦
🍆👋💦
🍆💦
🐓💍
👉🌮
👉👌
👌👈
👐🍅🍅
🖕
@$$
1m1j
1 man 1 jar
@@ -528,7 +512,6 @@ chonkies
chonky
chonkys
chraa
christ
christ killer
christ killers
chug
@@ -1571,7 +1554,6 @@ jerk-off
jerkoff
jerries
jerry
jesus
jesus christ
jewboy
jewed

View File

@@ -1,8 +1,8 @@
use crate::model::client::Client;
use axum::{Router, http::HeaderMap, routing::get};
use axum_extra::extract::{CookieJar, cookie::Cookie};
use axum::{http::HeaderMap, routing::get, Router};
use axum_extra::extract::{cookie::Cookie, CookieJar};
use axum_messages::MessagesManagerLayer;
use sqlx::{SqlitePool, pool::PoolOptions, sqlite::SqliteConnectOptions};
use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, SqlitePool};
use std::{
collections::HashSet,
fmt::Display,
@@ -87,23 +87,12 @@ static BAD_WORDS: LazyLock<HashSet<String>> = LazyLock::new(|| {
BAD_WORDS_FILE
.lines()
.map(|line| line.trim())
.filter(|line| !line.is_empty() && !line.starts_with('#')) // Skip empty lines and comments
.map(|word| {
word.to_lowercase()
.chars()
.filter(|c| c.is_alphabetic())
.collect()
})
.filter(|word: &String| !word.is_empty())
.map(|word| word.to_lowercase())
.collect()
});
fn contains_bad_word(text: &str) -> bool {
let cleaned_text: String = text
.to_lowercase()
.chars()
.filter(|c| c.is_alphabetic())
.collect();
let cleaned_text: String = text.to_lowercase();
BAD_WORDS
.iter()