Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-24-2008, 05:04 AM Space in Username
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
Is it alright to enable space in username? Is there any particular reason one can't enable users to put spaces in their usernames?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
 
Register now for full access!
Old 12-24-2008, 05:50 AM Re: Space in Username
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
in what & for what?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-24-2008, 06:10 AM Re: Space in Username
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
I cannot find any logical explanation for restricting usage of spaces in usernames. Well, maybe if you store your data in plain text files and the space is fields delimiter.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 12-24-2008, 06:33 AM Re: Space in Username
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
Quote:
Originally Posted by chrishirst View Post
in what & for what?
Anything.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 12-24-2008, 06:41 AM Re: Space in Username
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok, nothing particular in mind then.

the main reason spaces are not usually allowed in usernames or passwords is because a space is a delimiter in HTML and HTTP.
So an unencoded string using a space would "break" HTTP POST & GET transfers
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-24-2008, 06:52 AM Re: Space in Username
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
Hold on, how'd it break post transfers?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 12-24-2008, 07:04 AM Re: Space in Username
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
because a space is a delimiter. That's why spaces in URIs become %20

A POST is the same, the text stream ends at the first space.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-24-2008, 10:06 AM Re: Space in Username
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
So what problems would that pose in normal use?

What use would cause the problems?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 12-24-2008, 03:46 PM Re: Space in Username
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
So what problems would that pose in normal use
Probably none at all.

Quote:
What use would cause the problems?
Try sending a AJAX request with an unencoded space in the data
See what happens when you miss the quotes off for a form element attribute value when the data has a space in it.


other points;
email addresses cannot include a space.
subdomains and hostnames cannot have spaces in them. So if the system is setting up either of the above, spaces MUST not be allowed.

provided you are aware of the potential problems it can create and you take all steps to prevent them happening, it may never be a problem. But because there are many things that can go awry, it's simply safer not to allow spaces.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-24-2008, 03:55 PM Re: Space in Username
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
Ah yes, as for Ajax there's a javascript cure to encode

However I see your point now.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 12-24-2008, 07:37 PM Re: Space in Username
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
I just finished a script that makes an ajax call with text from a form text, writes it to a database and does some image manipulation using the text. I had to encode and unencode in a "loop", it was a real brain pain. But yes it does enhance a site to allow spaces and other special characters. Good-Luck!
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Space in Username
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45490 seconds with 12 queries