Commit: b7e19fb2c7d2e20a698cec82330d2876c4852a1b Author: Peter Kokot <peterko...@gmail.com> Mon, 26 Nov 2018 10:29:19 +0100 Parents: 16a0d2a6696e75498a94f4aef180541109c13905 Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=b7e19fb2c7d2e20a698cec82330d2876c4852a1b Log: Fix #64897: different username length This patch adds a username length validation. According to the SQL file schema the username field is varchar(16) so this sets its limit to 16 characters. Bugs: https://bugs.php.net/64897 Changed paths: M entry/svn-account.php Diff: diff --git a/entry/svn-account.php b/entry/svn-account.php index 7fed767..a27d22b 100644 --- a/entry/svn-account.php +++ b/entry/svn-account.php @@ -57,6 +57,10 @@ if (!preg_match('@^[a-z0-9_.-]+$@', $username)) { die("that username is invalid, use alphanumeric characters, or more specifically: [a-z0-9_.-]"); } +if (strlen($username) > 16) { + die('Username is too long. It must have 1-16 characters.'); +} + @mysql_connect("localhost","nobody", "") or die("failed to connect to database"); @mysql_select_db("phpmasterdb") -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php