Ticket #54 (new defect)

Opened 1 year ago

Last modified 1 year ago

allow spaces in known user names

Reported by: pwb Assigned to: rollercow
Priority: normal Milestone:
Component: blog-viewer Version:
Severity: normal Keywords:
Cc:

Description

Names of people who leave comments are allowed to contain spaces, but you can't add such names to the known users list.

Change History

04/06/07 18:47:30 changed by aeternus

From what I can see, line 771 of admin.lib.php needs to be changed from -

            if(trim($_POST['name'])=="" or !eregi("^([a-z0-9]+([:space:][a-z0-9]*))$",trim($_POST['name']))) {

to

            if(trim($_POST['name'])=="" or !eregi("^([a-z0-9]+([[:space:]][a-z0-9]*))$",trim($_POST['name']))) {

I.E [:space:] to [[:space:]]

Although a nicer regex which allows a more liberal name might be nice? I don't know.

I tested with the following code -

<?php
print eregi("^([a-z0-9]+([[:space:]][a-z0-9]*))$","Andy ")?"ANDY!":"NO ANDY :(!"; 
print "\n";
?>

04/06/07 18:52:47 changed by aeternus

Sorry -

   <?php
   print eregi("^([a-z0-9]+([[:space:]][a-z0-9]*))$","Andy Gimblett")?"ANDY!":"NO ANDY :(!"; print "\n";
   ?>

was the test code. I just took off Gimblett as I was playing with it.