From cda040b1653c6f026f4064e19b8e10c5c0d01bfd Mon Sep 17 00:00:00 2001 From: jes0131 Date: Tue, 26 May 2026 14:49:38 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=EA=B8=88=EC=B9=99=EC=96=B4=20?= =?UTF-8?q?=ED=95=84=ED=84=B0=EB=A7=81=EC=9A=A9=20=EB=8B=A8=EC=96=B4=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/filter/banned-words.txt | 962 +++++++++++++++++++++ 1 file changed, 962 insertions(+) create mode 100644 src/main/resources/filter/banned-words.txt diff --git a/src/main/resources/filter/banned-words.txt b/src/main/resources/filter/banned-words.txt new file mode 100644 index 0000000..2ba5fdc --- /dev/null +++ b/src/main/resources/filter/banned-words.txt @@ -0,0 +1,962 @@ +2 girls 1 cup +2g1c +4r5e +5h1t +5hit +a55 +a_s_s +acrotomophilia +alabama hot pocket +alaskan pipeline +anal +anilingus +anus +apeshit +ar5e +arrse +arse +arsehole +ass +ass-fucker +ass-hat +ass-pirate +assbag +assbandit +assbanger +assbite +assclown +asscock +asscracker +asses +assface +assfucker +assfukka +assgoblin +asshat +asshead +asshole +assholes +asshopper +assjacker +asslick +asslicker +assmonkey +assmunch +assmuncher +asspirate +assshole +asssucker +asswad +asswhole +asswipe +auto erotic +autoerotic +b!tch +b00bs +b17ch +b1tch +babeland +baby batter +baby juice +ball gag +ball gravy +ball kicking +ball licking +ball sack +ball sucking +ballbag +balls +ballsack +bampot +bangbros +bareback +barely legal +barenaked +bastard +bastardo +bastinado +bbw +bdsm +beaner +beaners +beastial +beastiality +beastility +beaver cleaver +beaver lips +bellend +bestial +bestiality +bi+ch +biatch +big black +big breasts +big knockers +big tits +bimbos +birdlock +bitch +bitcher +bitchers +bitches +bitchin +bitching +black cock +blonde action +blonde on blonde action +bloody +blow job +blow your load +blowjob +blowjobs +blue waffle +blumpkin +boiolas +bollock +bollocks +bollok +bollox +bondage +boner +boob +boobie +boobs +booobs +boooobs +booooobs +booooooobs +booty call +breasts +brown showers +brunette action +buceta +bugger +bukkake +bulldyke +bullet vibe +bullshit +bum +bung hole +bunghole +bunny fucker +busty +butt +butt-pirate +buttcheeks +butthole +buttmunch +buttplug +c0ck +c0cksucker +camel toe +camgirl +camslut +camwhore +carpet muncher +carpetmuncher +cawk +chinc +chink +choad +chocolate rosebuds +chode +cipa +circlejerk +cl1t +cleveland steamer +clit +clitface +clitoris +clits +clover clamps +clusterfuck +cnut +cock +cock-sucker +cockbite +cockburger +cockface +cockhead +cockjockey +cockknoker +cockmaster +cockmongler +cockmongruel +cockmonkey +cockmunch +cockmuncher +cocknose +cocknugget +cocks +cockshit +cocksmith +cocksmoker +cocksuck +cocksuck +cocksucked +cocksucked +cocksucker +cocksucking +cocksucks +cocksuka +cocksukka +cok +cokmuncher +coksucka +coochie +coochy +coon +coons +cooter +coprolagnia +coprophilia +cornhole +cox +crap +creampie +cum +cumbubble +cumdumpster +cumguzzler +cumjockey +cummer +cumming +cums +cumshot +cumslut +cumtart +cunilingus +cunillingus +cunnie +cunnilingus +cunt +cuntface +cunthole +cuntlick +cuntlick +cuntlicker +cuntlicker +cuntlicking +cuntlicking +cuntrag +cunts +cyalis +cyberfuc +cyberfuck +cyberfucked +cyberfucker +cyberfuckers +cyberfucking +d1ck +dammit +damn +darkie +date rape +daterape +deep throat +deepthroat +dendrophilia +dick +dickbag +dickbeater +dickface +dickhead +dickhole +dickjuice +dickmilk +dickmonger +dickslap +dicksucker +dickwad +dickweasel +dickweed +dickwod +dike +dildo +dildos +dingleberries +dingleberry +dink +dinks +dipshit +dirsa +dirty pillows +dirty sanchez +dlck +dog style +dog-fucker +doggie style +doggiestyle +doggin +dogging +doggy style +doggystyle +dolcett +domination +dominatrix +dommes +donkey punch +donkeyribber +doochbag +dookie +doosh +double dong +double penetration +douche +douchebag +dp action +dry hump +duche +dumb +dumbshit +dumshit +dvda +dyke +eat my ass +ecchi +ejaculate +ejaculated +ejaculates +ejaculating +ejaculatings +ejaculation +ejakulate +erotic +erotism +escort +eunuch +f u c k +f u c k e r +f4nny +f_u_c_k +fag +fagbag +fagg +fagging +faggit +faggitt +faggot +faggs +fagot +fagots +fags +fagtard +fanny +fannyflaps +fannyfucker +fanyy +fart +farted +farting +farty +fatass +fcuk +fcuker +fcuking +fecal +feck +fecker +felatio +felch +felching +fellate +fellatio +feltch +female squirting +femdom +figging +fingerbang +fingerfuck +fingerfucked +fingerfucker +fingerfuckers +fingerfucking +fingerfucks +fingering +fistfuck +fistfucked +fistfucker +fistfuckers +fistfucking +fistfuckings +fistfucks +fisting +flamer +flange +fook +fooker +fool +foot fetish +footjob +frotting +fuck +fuck buttons +fucka +fucked +fucker +fuckers +fuckhead +fuckheads +fuckin +fucking +fuckings +fuckingshitmotherfucker +fuckme +fucks +fucktards +fuckwhit +fuckwit +fudge packer +fudgepacker +fuk +fuker +fukker +fukkin +fuks +fukwhit +fukwit +futanari +fux +fux0r +g-spot +gang bang +gangbang +gangbanged +gangbanged +gangbangs +gay sex +gayass +gaybob +gaydo +gaylord +gaysex +gaytard +gaywad +genitals +giant cock +girl on +girl on top +girls gone wild +goatcx +goatse +god damn +god-dam +god-damned +goddamn +goddamned +gokkun +golden shower +goo girl +gooch +goodpoop +gook +goregasm +gringo +grope +group sex +guido +guro +hand job +handjob +hard core +hardcore +hardcoresex +heeb +hell +hentai +heshe +ho +hoar +hoare +hoe +hoer +homo +homoerotic +honkey +honky +hooker +hore +horniest +horny +hot carl +hot chick +hotsex +how to kill +how to murder +huge fat +humping +incest +intercourse +jack off +jack-off +jackass +jackoff +jail bait +jailbait +jap +jelly donut +jerk +jerk off +jerk-off +jigaboo +jiggaboo +jiggerboo +jism +jiz +jiz +jizm +jizm +jizz +juggs +kawk +kike +kinbaku +kinkster +kinky +kiunt +knob +knobbing +knobead +knobed +knobend +knobhead +knobjocky +knobjokey +kock +kondum +kondums +kooch +kootch +kum +kumer +kummer +kumming +kums +kunilingus +kunt +kyke +l3i+ch +l3itch +labia +leather restraint +leather straight jacket +lemon party +lesbo +lezzie +lmfao +lolita +lovemaking +lust +lusting +m0f0 +m0fo +m45terbate +ma5terb8 +ma5terbate +make me come +male squirting +masochist +master-bate +masterb8 +masterbat* +masterbat3 +masterbate +masterbation +masterbations +masturbate +menage a trois +milf +minge +missionary position +mo-fo +mof0 +mofo +mothafuck +mothafucka +mothafuckas +mothafuckaz +mothafucked +mothafucker +mothafuckers +mothafuckin +mothafucking +mothafuckings +mothafucks +mother fucker +motherfuck +motherfucked +motherfucker +motherfuckers +motherfuckin +motherfucking +motherfuckings +motherfuckka +motherfucks +mound of venus +mr hands +muff +muff diver +muffdiver +muffdiving +mutha +muthafecker +muthafuckker +muther +mutherfucker +n1gga +n1gger +nambla +nawashi +nazi +negro +neonazi +nig nog +nigg3r +nigg4h +nigga +niggah +niggas +niggaz +nigger +niggers +niglet +nimphomania +nipple +nipples +nob +nob jokey +nobhead +nobjocky +nobjokey +nsfw images +nude +nudity +numbnuts +nutsack +nympho +nymphomania +octopussy +omorashi +one cup two girls +one guy one jar +orgasim +orgasim +orgasims +orgasm +orgasms +orgy +p0rn +paedophile +paki +panooch +panties +panty +pawn +pecker +peckerhead +pedobear +pedophile +pegging +penis +penisfucker +phone sex +phonesex +phuck +phuk +phuked +phuking +phukked +phukking +phuks +phuq +piece of shit +pigfucker +pimpis +pis +pises +pisin +pising +pisof +piss +piss pig +pissed +pisser +pissers +pisses +pissflap +pissflaps +pissin +pissin +pissing +pissoff +pissoff +pisspig +playboy +pleasure chest +pole smoker +polesmoker +pollock +ponyplay +poo +poof +poon +poonani +poonany +poontang +poop +poop chute +poopchute +porn +porno +pornography +pornos +prick +pricks +prince albert piercing +pron +pthc +pube +pubes +punanny +punany +punta +pusies +pusse +pussi +pussies +pussy +pussylicking +pussys +pusy +puto +queaf +queef +queerbait +queerhole +quim +raghead +raging boner +rape +raping +rapist +rectum +renob +retard +reverse cowgirl +rimjaw +rimjob +rimming +rosy palm +rosy palm and her 5 sisters +ruski +rusty trombone +s hit +s&m +s.o.b. +s_h_i_t +sadism +sadist +santorum +scat +schlong +scissoring +screwing +scroat +scrote +scrotum +semen +sex +sexo +sexy +sh!+ +sh!t +sh1t +shag +shagger +shaggin +shagging +shaved beaver +shaved pussy +shemale +shi+ +shibari +shit +shit-ass +shit-bag +shit-bagger +shit-brain +shit-breath +shit-cunt +shit-dick +shit-eating +shit-face +shit-faced +shit-fit +shit-head +shit-heel +shit-hole +shit-house +shit-load +shit-pot +shit-spitter +shit-stain +shitass +shitbag +shitbagger +shitblimp +shitbrain +shitbreath +shitcunt +shitdick +shite +shiteating +shited +shitey +shitface +shitfaced +shitfit +shitfuck +shitfull +shithead +shitheel +shithole +shithouse +shiting +shitings +shitload +shitpot +shits +shitspitter +shitstain +shitted +shitter +shitters +shittiest +shitting +shittings +shitty +shitty +shity +shiz +shiznit +shota +shrimping +skank +skeet +slanteye +slut +slutbag +sluts +smeg +smegma +smut +snatch +snowballing +sodomize +sodomy +son-of-a-bitch +spac +spic +spick +splooge +splooge moose +spooge +spread legs +spunk +strap on +strapon +strappado +strip club +style doggy +suck +sucker +sucks +suicide girls +sultry women +swastika +swinger +t1tt1e5 +t1tties +tainted love +tard +taste my +tea bagging +teets +teez +testical +testicle +threesome +throating +thundercunt +tied up +tight white +tit +titfuck +tits +titt +tittie5 +tittiefucker +titties +titty +tittyfuck +tittywank +titwank +tongue in a +topless +tosser +towelhead +tranny +tribadism +tub girl +tubgirl +turd +tushy +tw4t +twat +twathead +twatlips +twatty +twink +twinkie +two girls one cup +twunt +twunter +undressing +upskirt +urethra play +urophilia +v14gra +v1gra +va-j-j +vag +vagina +venus mound +viagra +vibrator +violet wand +vjayjay +vorarephilia +voyeur +vulva +w00se +wang +wank +wanker +wanky +wet dream +wetback +white power +whoar +whore +willies +willy +wrapping men +wrinkled starfish +xrated +xx +xxx +yaoi +yellow showers +yiffy +zoophilia +πŸ–• From 92b6ef78c865f57544398c69a0127d975fc060e0 Mon Sep 17 00:00:00 2001 From: jes0131 Date: Tue, 26 May 2026 14:57:20 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=EA=B8=88=EC=B9=99=EC=96=B4=20?= =?UTF-8?q?=ED=95=84=ED=84=B0=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../snapy/global/filter/BannedWordFilter.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/main/java/com/gbsw/snapy/global/filter/BannedWordFilter.java diff --git a/src/main/java/com/gbsw/snapy/global/filter/BannedWordFilter.java b/src/main/java/com/gbsw/snapy/global/filter/BannedWordFilter.java new file mode 100644 index 0000000..6484636 --- /dev/null +++ b/src/main/java/com/gbsw/snapy/global/filter/BannedWordFilter.java @@ -0,0 +1,44 @@ +package com.gbsw.snapy.global.filter; + +import jakarta.annotation.PostConstruct; +import lombok.extern.slf4j.Slf4j; +import org.springframework.core.io.ClassPathResource; +import org.springframework.stereotype.Component; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.Set; +import java.util.stream.Collectors; + +@Slf4j +@Component +public class BannedWordFilter { + + private static final String BANNED_WORDS_PATH = "filter/banned-words.txt"; + + private Set bannedWords; + + @PostConstruct + public void init() throws IOException { + ClassPathResource resource = new ClassPathResource(BANNED_WORDS_PATH); + try (BufferedReader reader = new BufferedReader( + new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8))) { + bannedWords = reader.lines() + .map(String::trim) + .filter(line -> !line.isEmpty() && !line.startsWith("#")) + .map(String::toLowerCase) + .collect(Collectors.toUnmodifiableSet()); + } + log.info("BannedWordFilter loaded {} words", bannedWords.size()); + } + + public boolean containsBannedWord(String input) { + if (input == null || input.isBlank()) { + return false; + } + String normalized = input.toLowerCase().replaceAll("\\s+", ""); + return bannedWords.stream().anyMatch(normalized::contains); + } +} From d3f55dd8d0d884b78522181921a31843717c518c Mon Sep 17 00:00:00 2001 From: jes0131 Date: Tue, 26 May 2026 15:02:42 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=ED=95=B8=EB=93=A4=20=EA=B8=88?= =?UTF-8?q?=EC=B9=99=EC=96=B4=20ErrorCode=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/gbsw/snapy/global/exception/ErrorCode.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/gbsw/snapy/global/exception/ErrorCode.java b/src/main/java/com/gbsw/snapy/global/exception/ErrorCode.java index 1daad7f..01f44d7 100644 --- a/src/main/java/com/gbsw/snapy/global/exception/ErrorCode.java +++ b/src/main/java/com/gbsw/snapy/global/exception/ErrorCode.java @@ -29,6 +29,7 @@ public enum ErrorCode { DELETED_USER(HttpStatus.NOT_FOUND, "νƒˆν‡΄ν•œ μ‚¬μš©μžμž…λ‹ˆλ‹€."), INVALID_CREDENTIALS(HttpStatus.UNAUTHORIZED, "이메일 λ˜λŠ” λΉ„λ°€λ²ˆν˜Έκ°€ μ˜¬λ°”λ₯΄μ§€ μ•ŠμŠ΅λ‹ˆλ‹€."), DUPLICATE_HANDLE(HttpStatus.CONFLICT, "이미 μ‚¬μš© 쀑인 ν•Έλ“€μž…λ‹ˆλ‹€."), + HANDLE_CONTAINS_BANNED_WORD(HttpStatus.BAD_REQUEST, "μ‚¬μš©ν•  수 μ—†λŠ” 단어가 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€."), DUPLICATE_EMAIL(HttpStatus.CONFLICT, "이미 μ‚¬μš© 쀑인 μ΄λ©”μΌμž…λ‹ˆλ‹€."), DUPLICATE_PHONE(HttpStatus.CONFLICT, "이미 μ‚¬μš© 쀑인 μ „ν™”λ²ˆν˜Έμž…λ‹ˆλ‹€."), From aa36d2028118d96326cbee14ac784594c5990790 Mon Sep 17 00:00:00 2001 From: jes0131 Date: Tue, 26 May 2026 15:30:40 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=ED=95=B8=EB=93=A4=20=EA=B8=88?= =?UTF-8?q?=EC=B9=99=EC=96=B4=20=EA=B2=80=EC=82=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gbsw/snapy/domain/auth/service/AuthService.java | 5 +++++ .../com/gbsw/snapy/domain/users/service/UserService.java | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/main/java/com/gbsw/snapy/domain/auth/service/AuthService.java b/src/main/java/com/gbsw/snapy/domain/auth/service/AuthService.java index 21e93bf..d762fc2 100644 --- a/src/main/java/com/gbsw/snapy/domain/auth/service/AuthService.java +++ b/src/main/java/com/gbsw/snapy/domain/auth/service/AuthService.java @@ -13,6 +13,7 @@ import com.gbsw.snapy.domain.users.repository.UserRepository; import com.gbsw.snapy.global.exception.CustomException; import com.gbsw.snapy.global.exception.ErrorCode; +import com.gbsw.snapy.global.filter.BannedWordFilter; import com.gbsw.snapy.global.security.jwt.JwtProperties; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; @@ -33,9 +34,13 @@ public class AuthService { private final PasswordEncoder passwordEncoder; private final JwtProvider jwtProvider; private final JwtProperties jwtProperties; + private final BannedWordFilter bannedWordFilter; @Transactional public RegisterResponse register(RegisterRequest dto) { + if (bannedWordFilter.containsBannedWord(dto.getHandle())) { + throw new CustomException(ErrorCode.HANDLE_CONTAINS_BANNED_WORD); + } if (userRepository.existsByHandle(dto.getHandle())) { throw new CustomException(ErrorCode.DUPLICATE_HANDLE); } diff --git a/src/main/java/com/gbsw/snapy/domain/users/service/UserService.java b/src/main/java/com/gbsw/snapy/domain/users/service/UserService.java index dc64227..ee78e9b 100644 --- a/src/main/java/com/gbsw/snapy/domain/users/service/UserService.java +++ b/src/main/java/com/gbsw/snapy/domain/users/service/UserService.java @@ -17,6 +17,7 @@ import com.gbsw.snapy.domain.streaks.service.StreakService; import com.gbsw.snapy.global.exception.CustomException; import com.gbsw.snapy.global.exception.ErrorCode; +import com.gbsw.snapy.global.filter.BannedWordFilter; import com.gbsw.snapy.infra.s3.S3Service; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -36,6 +37,7 @@ public class UserService { private final S3Service s3Service; private final StreakService streakService; private final PhoneVerificationService phoneVerificationService; + private final BannedWordFilter bannedWordFilter; public UserProfileResponse getProfile(String handle, Long viewerId) { User user = userRepository.findByHandleAndDeletedAtIsNull(handle) @@ -145,12 +147,18 @@ public void deleteAccount(Long userId) { } public CheckHandleResponse checkHandle(String handle) { + if (bannedWordFilter.containsBannedWord(handle)) { + throw new CustomException(ErrorCode.HANDLE_CONTAINS_BANNED_WORD); + } boolean available = !userRepository.existsByHandle(handle); return new CheckHandleResponse(available); } @Transactional public void updateHandle(Long userId, UpdateHandleRequest request) { + if (bannedWordFilter.containsBannedWord(request.getHandle())) { + throw new CustomException(ErrorCode.HANDLE_CONTAINS_BANNED_WORD); + } if (userRepository.existsByHandle(request.getHandle())) { throw new CustomException(ErrorCode.DUPLICATE_HANDLE); }