-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
욕설 필터링 개선 #948
base: master
Are you sure you want to change the base?
욕설 필터링 개선 #948
Conversation
|
초딩이라는 단어는 비속어 보단 일반 단어로 많이 사용 하기 때문에
|
그러면 차라리 |
한번 검토해보겠습니다. |
안녕하세요, 본 PR 취지에는 공감하나 몇가지 아쉬운 부분과 문제점들이 보여 조심스레 남겨봅니다.
감사합니다. |
1번은 많은 생각을 해보아 다시 수정해보겠습니다 기여해주셔서 감사합니다. |
개인 서버에서 테스트는 완료 한 상태이나, Github 옮기다가 실수한 사항이 있을 수 있으니 참고 해주시기 바랍니다.
@kdhkr 님의 부탁 사항을 반영 하여 추가 하였습니다. 버그를 알려주시면 수정 해드리겠습니다. |
사이즈가 작은 것을 확인 하여 개선합니다.
_2021_11_23_15_09_36_642.mp4Files changed에 나와있는 변경사항은 다 적용했습니다. 그런데도 영상과 같은 오류가 있네요 (욕설 검열 강화가 적용되지 않음) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
몇 가지 요청하고 싶은 수정 사항이 있어 요청 드립니다.
Server/lib/Web/lang/ko_KR.json
Outdated
@@ -600,6 +600,7 @@ | |||
"sortUser": "접속자 목록 레벨 순 정렬", | |||
"onlyWaiting": "대기 중인 방만 보기", | |||
"onlyUnlock": "열려 있는 방만 보기", | |||
"onlyabuse": "욕설 검열 강화 하기", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"욕설 필터링 강화하기"가 문맥상 더 맞아 보입니다.
Server/lib/Web/lib/kkutu/body.js
Outdated
@@ -76,6 +76,7 @@ function applyOptions(opt){ | |||
$("#sort-user").attr('checked', $data.opts.su); | |||
$("#only-waiting").attr('checked', $data.opts.ow); | |||
$("#only-unlock").attr('checked', $data.opts.ou); | |||
$("#only-abuse").attr('checked', $data.opts.ab); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 줄과 들여쓰기를 맞춰주시기 바랍니다.
Server/lib/Web/lib/kkutu/head.js
Outdated
@@ -38,7 +38,8 @@ var OPTIONS; | |||
var MAX_LEVEL = 360; | |||
var TICK = 30; | |||
var EXP = []; | |||
var BAD = new RegExp([ "느으*[^가-힣]*금마?", "니[^가-힣]*(엄|앰|엠)", "(ㅄ|ㅅㅂ|ㅂㅅ)", "미친(년|놈)?", "(병|븅|빙)[^가-힣]*신", "보[^가-힣]*지", "(새|섀|쌔|썌)[^가-힣]*(기|끼)", "섹[^가-힣]*스", "(시|씨|쉬|쒸)이*입?[^가-힣]*(발|빨|벌|뻘|팔|펄)", "십[^가-힣]*새", "씹", "(애|에)[^가-힣]*미", "자[^가-힣]*지", "존[^가-힣]*나", "좆|죶", "지랄", "창[^가-힣]*(녀|년|놈)", "fuck", "sex" ].join('|'), "g"); | |||
var BAD = new RegExp([ "느으*[^가-힣]*금마?", "니[^가-힣]*(엄|앰|엠)", "(ㅄ|ㅅㅂ|ㅂㅅ)", "미친[^가-힣](년|놈|개)?", "(병|븅|빙|등)[^가-힣]*(신|딱)", "보[^가-힣]*지", "(새|섀|쌔|썌)[^가-힣]*(기|끼)", "섹[^가-힣]*스", "(시|씨|쉬|쒸)이*입?[^가-힣]*(발|빨|벌|뻘|팔|펄)", "십[^가-힣]*새", "(애|에)[^가-힣]*미", "자[^가-힣]*지", "(졸|존)[^가-힣]*(나|라|만)","좃|좆|죶", "지랄", "창[^가-힣]*(녀|년|놈)", "개[^가-힣]*(년|녀|쓰레기|스레기|돼지|되지|초딩)", "나가[^가-힝]*(뒤져|디져|죽어)","(닥|닭)[^가-힣]*(쳐|처)", "(또|똘)[^가-힣]*(아이|라이)","빡(통대가리|대가리)", "썩을", "(fuck|뻑큐|뻐큐)", "(부|브|불)[^가-힣]*(알|랄)","씹", "십[^가-힣]*(년|놈)" , "아가리[^가-힣]*?","(엠|엄)[^가-힣]*창","(짱|장)[^가-힣]*(깨|꼴라|궤)","(찐|왕)[^가-힣]*(따|다)", "틀딱", "페[^가-힣]*미", "한남", "(염|옘)[^가-힣]*병", "sex" ].join('|'), "g"); | |||
var oldBAD = new RegExp([ "느으*[^가-힣]*금마?", "니[^가-힣]*(엄|앰|엠)", "(ㅄ|ㅅㅂ|ㅂㅅ)", "미친(년|놈)?", "(병|븅|빙)[^가-힣]*신", "보[^가-힣]*지", "(새|섀|쌔|썌)[^가-힣]*(기|끼)", "섹[^가-힣]*스", "(시|씨|쉬|쒸)이*입?[^가-힣]*(발|빨|벌|뻘|팔|펄)", "십[^가-힣]*새", "씹", "(애|에)[^가-힣]*미", "자[^가-힣]*지", "존[^가-힣]*나", "좆|죶", "지랄", "창[^가-힣]*(녀|년|놈)", "fuck", "sex" ].join('|'), "g"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 변수명에는 snake case를 적용하여
ADVANCED_BAD
와 같은 형식으로 변경하여 주시기 바랍니다. - 필터링을 "강화한다"는 초점의 풀 리퀘스트이므로, 기존 변수를 oldBAD로 변경하는 것이 아닌, 새로운 변수를 다른 이름으로 지정하시는 것이 좋아 보입니다.
Server/lib/Web/views/kkutu.pug
Outdated
@@ -113,6 +113,8 @@ block Middle | |||
+SettingOption('only-waiting', L('onlyWaiting'), "width: 200px;") | |||
h4 | |||
+SettingOption('only-unlock', L('onlyUnlock'), "width: 200px;") | |||
h4 | |||
+SettingOption('only-abuse', L('onlyabuse'), "width: 200px;") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onlyAbuse
로 변경 부탁드립니다.
확인 해보겠습니다. |
위 오류는 |
grunt 로 min.js 파일이 만들어져 이 파일은 제거 합니다.
_2021_11_24_15_03_07_351.mp4commit 다시 하신 부분 수정하고 grunt 돌리고 다시 테스트해봤습니다. 그런데도 필터링 강화가 적용되지 않는데 |
@@ -38,7 +38,8 @@ var OPTIONS; | |||
var MAX_LEVEL = 360; | |||
var TICK = 30; | |||
var EXP = []; | |||
var BAD = new RegExp([ "느으*[^가-힣]*금마?", "니[^가-힣]*(엄|앰|엠)", "(ㅄ|ㅅㅂ|ㅂㅅ)", "미친(년|놈)?", "(병|븅|빙)[^가-힣]*신", "보[^가-힣]*지", "(새|섀|쌔|썌)[^가-힣]*(기|끼)", "섹[^가-힣]*스", "(시|씨|쉬|쒸)이*입?[^가-힣]*(발|빨|벌|뻘|팔|펄)", "십[^가-힣]*새", "씹", "(애|에)[^가-힣]*미", "자[^가-힣]*지", "존[^가-힣]*나", "좆|죶", "지랄", "창[^가-힣]*(녀|년|놈)", "fuck", "sex" ].join('|'), "g"); | |||
var BAD = new RegExp([ "느으*[^가-힣]*금마?", "니[^가-힣]*(엄|앰|엠)", "(ㅄ|ㅅㅂ|ㅂㅅ)", "미친[^가-힣](년|놈|개)?", "(병|븅|빙|등)[^가-힣]*(신|딱)", "보[^가-힣]*지", "(새|섀|쌔|썌)[^가-힣]*(기|끼)", "섹[^가-힣]*스", "(시|씨|쉬|쒸)이*입?[^가-힣]*(발|빨|벌|뻘|팔|펄)", "십[^가-힣]*새", "(애|에)[^가-힣]*미", "자[^가-힣]*지", "(졸|존)[^가-힣]*(나|라|만)","좃|좆|죶", "지랄", "창[^가-힣]*(녀|년|놈)", "개[^가-힣]*(년|녀|쓰레기|스레기|돼지|되지|초딩)", "나가[^가-힝]*(뒤져|디져|죽어)","(닥|닭)[^가-힣]*(쳐|처)", "(또|똘)[^가-힣]*(아이|라이)","빡(통대가리|대가리)", "썩을", "(fuck|뻑큐|뻐큐)", "(부|브|불)[^가-힣]*(알|랄)","씹", "십[^가-힣]*(년|놈)" , "아가리[^가-힣]*?","(엠|엄)[^가-힣]*창","(짱|장)[^가-힣]*(깨|꼴라|궤)","(찐|왕)[^가-힣]*(따|다)", "틀딱", "페[^가-힣]*미", "한남", "(염|옘)[^가-힣]*병", "sex" ].join('|'), "g"); | |||
var ADVANCED_BAD = new RegExp([ "느으*[^가-힣]*금마?", "니[^가-힣]*(엄|앰|엠)", "(ㅄ|ㅅㅂ|ㅂㅅ)", "미친(년|놈)?", "(병|븅|빙)[^가-힣]*신", "보[^가-힣]*지", "(새|섀|쌔|썌)[^가-힣]*(기|끼)", "섹[^가-힣]*스", "(시|씨|쉬|쒸)이*입?[^가-힣]*(발|빨|벌|뻘|팔|펄)", "십[^가-힣]*새", "씹", "(애|에)[^가-힣]*미", "자[^가-힣]*지", "존[^가-힣]*나", "좆|죶", "지랄", "창[^가-힣]*(녀|년|놈)", "fuck", "sex" ].join('|'), "g"); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아뇨 이걸 반대로 작성하셔야죠. 지금 적용하고싶으신 정규식이 더 엄격한 규칙 아니었나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정해보겠습니다.
PR 테스트 결과 정상 작동 하는 것으로 확인 되었고, |
|
기존 끄투 욕설 소스로는 검열 하기 참 힘듭니다.
욕설 검열을 좀 더 세게 고쳤습니다.
단점이나 저가 고쳐야할 사항이 있으면 언제든지 말해주세요.