Fixed HTACCESS to include new username rules. Removed period (.) from allowed username content to prevent URL conflicts
This commit is contained in:
parent
eb591d9902
commit
a590af9e3a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
admin/*_db_config.php
|
||||
.htaccess
|
||||
favicon.ico
|
||||
|
5
.htaccess
Normal file
5
.htaccess
Normal file
@ -0,0 +1,5 @@
|
||||
RewriteEngine on
|
||||
|
||||
RewriteRule ^/?user/([a-zA-Z0-9\-\_]+)$ /user/user.php?username=$1 [L,NC]
|
||||
|
||||
RewriteRule ^/?tournament/([0-9]+)$ /tournament/tourney.php?tourneyID=$1 [L,NC]
|
@ -59,7 +59,7 @@ try { // Try opening the SQL database connection
|
||||
<!-- THIS DIV IS FOR INPUT -->
|
||||
<div id="textInputArea">
|
||||
<label for="username" class="inputLabel" >Username:</label>
|
||||
<input type="text" id="username" name="username" class="newLine" maxlength="30" oninput="usernameConfirm()" tabindex="1" pattern="^[a-zA-Z0-9]+([._\-]?[a-zA-Z0-9])+([._\-]?)$" required>
|
||||
<input type="text" id="username" name="username" class="newLine" maxlength="30" oninput="usernameConfirm()" tabindex="1" pattern="^[a-zA-Z0-9]+([_\-]?[a-zA-Z0-9])+([_\-]?)$" required>
|
||||
<p id="confirmUsername"></p>
|
||||
<label for="password" class="inputLabel newLine">Password:</label>
|
||||
<input type="password" id="password" name="password" minlength="6" oninput="checkPasswordRequirements()" required/>
|
||||
|
@ -107,7 +107,7 @@ function usernameConfirm() {
|
||||
// Temporarily convert the userlist to lower case. This will allow us to compare input vs. saved
|
||||
var listOfUsers = userList.map(e => e.toLowerCase());
|
||||
|
||||
var confirmRegEx = new RegExp("^[a-zA-Z0-9]+([._-]?[a-zA-Z0-9])+([._-]?)$");
|
||||
var confirmRegEx = new RegExp("^[a-zA-Z0-9]+([_-]?[a-zA-Z0-9])+([_-]?)$");
|
||||
|
||||
// If the username is blank, clear the notice
|
||||
// Otherwise, we'll check the userlist created by PHP which was converted for JS
|
||||
|
@ -67,7 +67,7 @@ try { // Try opening the SQL database connection
|
||||
<!-- THIS DIV IS FOR INPUT -->
|
||||
<div id="textInputArea">
|
||||
<label for="username" class="inputLabel" id="usernameLabel">Username: <span id="confirmUsername"></span></label>
|
||||
<input type="text" id="username" name="username" class="newLine" maxlength="30" oninput="usernameConfirm()" tabindex="1" pattern="^[a-zA-Z0-9]+([._\-]?[a-zA-Z0-9])+([._\-]?)$" required>
|
||||
<input type="text" id="username" name="username" class="newLine" maxlength="30" oninput="usernameConfirm()" tabindex="1" pattern="^[a-zA-Z0-9]+([_\-]?[a-zA-Z0-9])+([_\-]?)$" required>
|
||||
<label for="password" class="inputLabel">Password:</label>
|
||||
<input type="password" id="password" name="password" required oninput="checkPasswordRequirements()" tabindex="1">
|
||||
<p class="newLine"></p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user