Skip to content

Commit

Permalink
2.11.8: Updated regex for username in forms
Browse files Browse the repository at this point in the history
  • Loading branch information
webpwnized committed Dec 17, 2023
1 parent 5b6703d commit 4e36af1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion edit-account-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
function onSubmitOfForm(/*HTMLFormElement*/ theForm){
try{
if(lValidateInput == "TRUE"){
var lUnsafeCharacters = /[`~!@#$%^&*()-_=+\[\]{}\\|;':",./<>?]/;
var lUnsafeCharacters = /[\W]/;
if (theForm.username.value.length > 15){
alert('Username too long. We dont want to allow too many characters.\n\nSomeone might have enough room to enter a hack attempt.');
return false;
Expand Down
2 changes: 1 addition & 1 deletion includes/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ------------------------------------------
* @VERSION
* ------------------------------------------*/
$C_VERSION = "2.11.7";
$C_VERSION = "2.11.8";
$C_VERSION_STRING = "Version: " . $C_VERSION;
$C_MAX_HINT_LEVEL = 1;

Expand Down
2 changes: 1 addition & 1 deletion login.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
function onSubmitOfLoginForm(/*HTMLFormElement*/ theForm){
try{
if(lValidateInput == "TRUE"){
var lUnsafeCharacters = /[`~!@#$%^&*()-_=+\[\]{}\\|;':",./<>?]/;
var lUnsafeCharacters = /[\W]/;
if (theForm.username.value.length > 15){
alert('Username too long. We dont want to allow too many characters.\n\nSomeone might have enough room to enter a hack attempt.');
return false;
Expand Down
2 changes: 1 addition & 1 deletion register.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
function onSubmitOfForm(/*HTMLFormElement*/ theForm){
try{
if(lValidateInput == "TRUE"){
var lUnsafeCharacters = /[`~!@#$%^&*()-_=+\[\]{}\\|;':",./<>?]/;
var lUnsafeCharacters = /[\W]/;
if (theForm.username.value.length > 15 ||
theForm.password.value.length > 15){
alert('Username too long. We dont want to allow too many characters.\n\nSomeone might have enough room to enter a hack attempt.');
Expand Down
2 changes: 1 addition & 1 deletion user-info-xpath.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

function onSubmitOfForm(/*HTMLFormElement*/ theForm){
try{
var lUnsafeCharacters = /[`~!@#$%^&*()-_=+\[\]{}\\|;':",./<>?]/;
var lUnsafeCharacters = /[\W]/;

if(lValidateInput == "TRUE"){
if (theForm.username.value.length > 15){
Expand Down
2 changes: 1 addition & 1 deletion user-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

function onSubmitOfForm(/*HTMLFormElement*/ theForm){
try{
var lUnsafeCharacters = /[`~!@#$%^&*()-_=+\[\]{}\\|;':",./<>?]/;
var lUnsafeCharacters = /[\W]/;

if(lValidateInput == "TRUE"){
if (theForm.username.value.length > 15){
Expand Down

0 comments on commit 4e36af1

Please sign in to comment.