Gossamer Forum
Home : Products : DBMan : Installation :

Space in a user name not allowed ?

Quote Reply
Space in a user name not allowed ?
I can't use Katana Man as a username apparently. It would have to be KatanaMan Frown

Any ideas on allowing for spaces in the user name ?
Quote Reply
Re: Space in a user name not allowed ? In reply to
I asked about this too, some months back, but only got a short reply that basically said, "all usernames are like this."

Agreed--that most are. However, this BB accepts spaces in its "usernames." Perhaps someone could explain how Ted did it with UBB and we could work on the necessary routines for dbman. I know it would help my users (non-techie returned peace corps volunteers).

Smile
Quote Reply
Re: Space in a user name not allowed ? In reply to
The reason for the restriction is the username is used in the session id which corresponds to a file/url. It shouldn't be too hard to do the proper escaping if someone wants to give it a try. =)

Cheers,

Alex
Quote Reply
Re: Space in a user name not allowed ? In reply to
You can make this work by modifying this line in db.cgi (line 678):

unless ((length($in{'userid'}) >= 3) and (length($in{'userid'}) <= 12) and ($in{'userid'} =~ /^[a-zA-Z0-9]+$/))

To look like this:

unless ((length($in{'userid'}) >= 3) and (length($in{'userid'}) <= 12) a
nd ($in{'userid'} =~ /^[a-zA-Z0-9\" " ]+$/))

I personally would not recommend doing this is you intend to use the database for anything other than DBMAN, i.e. reporting, running shell scripts against, etc., especially in a UNIX environment. UNIX does not like spaces embedded in filenames, etc., and may choke on this.

As always, there are ways to make things work, and this is yet another hack.

;-)

Take care

Jamie


------------------
James A. (Jamie) Dennis
*Certified AIX Administrator
*Certified Solaris Administrator
*Member - SAGE, USENIX
Quote Reply
Re: Space in a user name not allowed ? In reply to
You'll need to do more than that, as otherwise your userid will end up like:

uid=My Useranem&db=default

and the space will mess up the URL. You might be able to get away with just:

$db_script_link_url =~ s/\s/+/g;

in db.cgi, but it might take more then that..

Cheers,

Alex
Quote Reply
Re: Space in a user name not allowed ? In reply to
Good call Alex

I tried this before I submitted it and it worked fine for logging me in. However, I didn't do the next step - BAD JAMIE!
While it DOES log me in, it also causes a "invalid/expired user session" message when a person tries to go anywhere, due EXACTLY to the space.

Hmmmmm......

I stick by my original statement.....best not to use spaces in the names anyway. But, I will continue to work on this anyway, cause I'm a hard-headed southern ohio boy.

Jamie

------------------
James A. (Jamie) Dennis
*Certified AIX Administrator
*Certified Solaris Administrator
*Member - SAGE, USENIX