From b2f0b2eea4ec6fe819e871579189b47be0d53142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Tue, 30 Oct 2018 12:31:39 +0900 Subject: [PATCH] Revert "Add: banned word DB" This reverts commit 90c8ffa3a62fb2f282c0cb291bcd8acac8ca19ad. --- src/web/js/lib/account_validator.js | 6 ++---- src/web/server/maestro/check_id.php | 26 -------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/web/js/lib/account_validator.js b/src/web/js/lib/account_validator.js index 8f65b53..842b48e 100644 --- a/src/web/js/lib/account_validator.js +++ b/src/web/js/lib/account_validator.js @@ -19,12 +19,10 @@ AccountValidator.prototype.messageForInvalidMaestroID = function(textID) { return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MINIMUM + "글자 이상이어야 합니다."; else if(textID.length > AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM) return "마에스트로 계정명은 " + AccountValidator.MAESTRO_ID_LENGTH_MAXIMUM + "글자 이하이어야 합니다."; - else if((/\s/.test(textID))) - return "마에스트로 계정명에는 띄어쓰기를 허용하지 않고 있습니다."; else if(!(/^[A-Za-z]/.test(textID))) - return "마에스트로 계정명은 글자와 숫자로만 적어주세요."; + return "마에스트로 계정명은 알파벳으로 시작해야 합니다."; else if((/[^\w]/g).test(textID)) - return "마에스트로 계정명은 글자와 숫자로만 적어주세요."; + return "마에스트로 계정명은 알파벳과 숫자로만 적어주세요."; } diff --git a/src/web/server/maestro/check_id.php b/src/web/server/maestro/check_id.php index 1ddba4d..e174fcd 100644 --- a/src/web/server/maestro/check_id.php +++ b/src/web/server/maestro/check_id.php @@ -7,13 +7,6 @@ include "./../setup/connect_db.php"; $maestro_name = $_POST["maestro_name"]; -$banned_word = banned_maestro_name($maestro_name); -if($banned_word !== null) { - set_error_message($maestro_name." : 금칙어로 등록된 이름입니다. 다른 아이디로 입력해주세요."); - send_result_fail(); - exit; -} - $maestro_id = get_maestro_id($maestro_name); if($maestro_id !== null) { set_error_code("registered_name"); @@ -27,25 +20,6 @@ exit; -function banned_maestro_name($maestroName) { - global $db_conn; - - $query = " - SELECT Word - FROM banned_word - WHERE Word = ? - "; - $stmt = $db_conn->prepare($query); - $stmt->bind_param("s", $maestroName); - $stmt->execute(); - $stmt->bind_result($maestroID); - // while($stmt->fetch()) - $stmt->fetch(); - $stmt->close(); - - return $maestroID; -} - function get_maestro_id($maestro_name) { global $db_conn;