Print Page | Close Window

Getting my Username to go past 15 charter

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=14395
Printed Date: 13 April 2026 at 5:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Getting my Username to go past 15 charter
Posted By: gregcaulder
Subject: Getting my Username to go past 15 charter
Date Posted: 23 March 2005 at 10:37pm
Ok i have a problem with Usernames going past 15 charcters. I have edited the Register.asp page and the add_member.asp page in the admin section to go up to 25 charcters.

<input type="text" name="name1" size="25" maxlength="25" value="" />

The problem is that after i subbmit it wit han example beyond 15 charcters; anyhting between 15-25.

Wehn i click on my Members list it shows teh account to only display 15 charcters Maxium. Which is very disapointing. The database allows charter length longer then 15 char's so i have no problem there.


What do i need to change to make it display the Full Username.




Replies:
Posted By: WebWiz-Bruce
Date Posted: 24 March 2005 at 5:29am
When the form entry is read in in the regsiter.asp file a 'Trim' is run on the entry to reduce it down to 15 characters.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: gregcaulder
Date Posted: 24 March 2005 at 11:41am
Is there anyway to get around it or to change it from only reading 15 charters?


Posted By: WebWiz-Bruce
Date Posted: 24 March 2005 at 12:02pm
Yes change the amount the input is Trimmed by that I metioned in my last post.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: gregcaulder
Date Posted: 24 March 2005 at 1:00pm
I see. So it trims the length to 15 charcters. So if someone were to register with something longer the n15 charcters it would be trimmed no matter what down to 15 charters before entering the database.

How would i go about editing this trimming factor. I lookd in the common.asp file and found nothing. Which files will i need to edit, and if possibley what lines of code are they located in?


Greg


Posted By: gregcaulder
Date Posted: 24 March 2005 at 1:02pm
Nevermind i found the Trim string.

Thanks for the help.

Greg


Posted By: TheLee
Date Posted: 20 May 2005 at 11:20pm
Make sure you remember to change the maxlength and trim in all the other pages that it exists in as well, such as the private messanger pages and the pop up search for username page,etc 


Posted By: dpyers
Date Posted: 21 May 2005 at 3:51pm
Don't forget to change the size of the field in the database as well.
The db field size is longer than 15 characters because the update routine replaces characters that could be used for sql injection attacks (e.g. ', [, ", etc.) with their decimal equivalents. You need to have extra space in the db field to hold those replacement characters.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: wolfman
Date Posted: 02 August 2005 at 8:44am
Originally posted by dpyers dpyers wrote:

Don't forget to change the size of the field in the database as well.
The db field size is longer than 15 characters because the update routine replaces characters that could be used for sql injection attacks (e.g. ', [, ", etc.) with their decimal equivalents. You need to have extra space in the db field to hold those replacement characters.
 
This would be for SQL only, correct?  I am using an access dbase.


Posted By: dj air
Date Posted: 02 August 2005 at 12:07pm
no thats done in both versions.

so you have to account for it within the access database also


Posted By: dpyers
Date Posted: 02 August 2005 at 12:45pm
If you want 25 characters, I'd set the db field to 40 and the trim stuff to 25. The expansion of characters to prevent sql injection happens after the trim when it's posted to either access or mssql.

-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net