From: Matteo Nastasi (mop) Date: Mon, 23 Nov 2015 18:20:06 +0000 (+0100) Subject: trim added to new guaranteed users names X-Git-Tag: v5.3.0~42 X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=171168210237aee11e4e26207e569c50eaa2ae0b trim added to new guaranteed users names --- diff --git a/TODO.txt b/TODO.txt index 86bdddd..156c09c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -7,7 +7,7 @@ - Not triple chars between letters - 10002 message when already clicked - usermgmt: add user delete - - trim spaces in apprentice form + DONE - trim spaces in apprentice form DONE - Remove books from chat DONE - usermgmt: add email diff --git a/web/index_wr.php b/web/index_wr.php index b266abb..cb5ed92 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -428,7 +428,7 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) if (($wa_lock = Warrant::lock_data(TRUE)) != FALSE) { if (($fp = @fopen(LEGAL_PATH."/warrant.txt", 'a')) != FALSE) { /* Unix time | session | nickname | IP | where was | mesg */ - fwrite($fp, sprintf("%ld|%s|%s|%s|\n", $curtime, xcapelt($user->name), xcapelt(urldecode($cli_name)), xcapelt(urldecode($cli_email)))); + fwrite($fp, sprintf("%ld|%s|%s|%s|\n", $curtime, xcapelt($user->name), xcapelt(trim(urldecode($cli_name))), xcapelt(trim(urldecode($cli_email))))); fclose($fp); } Warrant::unlock_data($wa_lock); @@ -450,8 +450,8 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie) if (($bdb = BriskDB::create()) == FALSE) break; - $cli_name = urldecode($cli_name); - $cli_email = urldecode($cli_email); + $cli_name = trim(urldecode($cli_name)); + $cli_email = trim(urldecode($cli_email)); // check for already used fields if (($idret = $bdb->check_record_by_login_or_email($cli_name, $cli_email)) != 0) {