don't be too restrictive w/ blocking names
This commit is contained in:
@@ -1,19 +1,3 @@
|
|||||||
🤩🍆💦
|
|
||||||
🖕🤬🖕
|
|
||||||
✊🍆
|
|
||||||
✊🍆💦
|
|
||||||
✊🍌
|
|
||||||
✊🍌💦
|
|
||||||
🍆🍑💦
|
|
||||||
🍆👅💦
|
|
||||||
🍆👋💦
|
|
||||||
🍆💦
|
|
||||||
🐓💍
|
|
||||||
👉🌮
|
|
||||||
👉👌
|
|
||||||
👌👈
|
|
||||||
👐🍅🍅
|
|
||||||
🖕
|
|
||||||
@$$
|
@$$
|
||||||
1m1j
|
1m1j
|
||||||
1 man 1 jar
|
1 man 1 jar
|
||||||
@@ -528,7 +512,6 @@ chonkies
|
|||||||
chonky
|
chonky
|
||||||
chonkys
|
chonkys
|
||||||
chraa
|
chraa
|
||||||
christ
|
|
||||||
christ killer
|
christ killer
|
||||||
christ killers
|
christ killers
|
||||||
chug
|
chug
|
||||||
@@ -1571,7 +1554,6 @@ jerk-off
|
|||||||
jerkoff
|
jerkoff
|
||||||
jerries
|
jerries
|
||||||
jerry
|
jerry
|
||||||
jesus
|
|
||||||
jesus christ
|
jesus christ
|
||||||
jewboy
|
jewboy
|
||||||
jewed
|
jewed
|
||||||
|
21
src/main.rs
21
src/main.rs
@@ -1,8 +1,8 @@
|
|||||||
use crate::model::client::Client;
|
use crate::model::client::Client;
|
||||||
use axum::{Router, http::HeaderMap, routing::get};
|
use axum::{http::HeaderMap, routing::get, Router};
|
||||||
use axum_extra::extract::{CookieJar, cookie::Cookie};
|
use axum_extra::extract::{cookie::Cookie, CookieJar};
|
||||||
use axum_messages::MessagesManagerLayer;
|
use axum_messages::MessagesManagerLayer;
|
||||||
use sqlx::{SqlitePool, pool::PoolOptions, sqlite::SqliteConnectOptions};
|
use sqlx::{pool::PoolOptions, sqlite::SqliteConnectOptions, SqlitePool};
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashSet,
|
collections::HashSet,
|
||||||
fmt::Display,
|
fmt::Display,
|
||||||
@@ -87,23 +87,12 @@ static BAD_WORDS: LazyLock<HashSet<String>> = LazyLock::new(|| {
|
|||||||
BAD_WORDS_FILE
|
BAD_WORDS_FILE
|
||||||
.lines()
|
.lines()
|
||||||
.map(|line| line.trim())
|
.map(|line| line.trim())
|
||||||
.filter(|line| !line.is_empty() && !line.starts_with('#')) // Skip empty lines and comments
|
.map(|word| word.to_lowercase())
|
||||||
.map(|word| {
|
|
||||||
word.to_lowercase()
|
|
||||||
.chars()
|
|
||||||
.filter(|c| c.is_alphabetic())
|
|
||||||
.collect()
|
|
||||||
})
|
|
||||||
.filter(|word: &String| !word.is_empty())
|
|
||||||
.collect()
|
.collect()
|
||||||
});
|
});
|
||||||
|
|
||||||
fn contains_bad_word(text: &str) -> bool {
|
fn contains_bad_word(text: &str) -> bool {
|
||||||
let cleaned_text: String = text
|
let cleaned_text: String = text.to_lowercase();
|
||||||
.to_lowercase()
|
|
||||||
.chars()
|
|
||||||
.filter(|c| c.is_alphabetic())
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
BAD_WORDS
|
BAD_WORDS
|
||||||
.iter()
|
.iter()
|
||||||
|
Reference in New Issue
Block a user