Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Suggestion for function IsValidString
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarshalMix
Junior Member

194 Posts

Posted - 29 August 2006 :  20:37:49  Show Profile  Reply with Quote
While rummaging around in the forum code, I noticed that
IsValidString is only used to check usernames and passwords.

The function is duplicated and referenced in the following files:
admin_config_namefilter.asp (line 368)
setup.asp (line 4569)
register.asp(line 744)

I would suggest that a simple change might be to create a new file
inc_isvalidstring.asp and insert the function code into this new file.

Then remove the code in the three files, replacing each instance with:
<!--#INCLUDE FILE="inc_isvalidstring.asp"-->

Whether it is the one currently in the base code or the one suggested
by -gary above is a matter of preferences.

Perhaps both could be created as:
inc_isvalidstring.asp
inc_isinvalidstring.asp

The register.asp has previously had the "" (quote) added as an invalid character.
The other two places should also be modified.

I would also like to propose that the imbedded space be disallowed.

Regards.
<

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 August 2006 :  03:06:18  Show Profile  Visit HuwR's Homepage  Reply with Quote
yes, putting the function in an include would be helpful, however the use of " in usernames has now been fixed, so does not need to be in the InvalidChars list any more.


Why do you think Spaces should be disallowed ? lots of people use spaces in their usernames<
Go to Top of Page

MarshalMix
Junior Member

194 Posts

Posted - 31 August 2006 :  01:20:41  Show Profile  Reply with Quote
Thanks, I wasn't sure if fixing the registration for " negated the need in the other places.
Now, I know.
I am slowly getting to know the forum code but the interactions are sometimes complex.

I have another password controlled site which started out allowing spaces.
People would forget to use them whe signing in and throw fits my way.
I solved the problem by compressing out the spaces during registration and login.
They still get to use spaces but if they forget, it still works.

Considering how long this forum has been active and allowed spaces, it seems moot.
It was just a thought.

Regards.
<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 31 August 2006 :  08:10:22  Show Profile  Reply with Quote
quote:
Originally posted by MarshalMix
I have another password controlled site which started out allowing spaces.
People would forget to use them whe signing in and throw fits my way.
Unfortunately there is no (legal ) fix for the stupidity of people!

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarshalMix
Junior Member

194 Posts

Posted - 31 August 2006 :  13:38:11  Show Profile  Reply with Quote
Agreed.
Actually, I don't think of people as stupid.
Just rigidly opposed to learning.

Regards.
<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 31 August 2006 :  15:07:47  Show Profile  Visit AnonJr's Homepage  Reply with Quote
quote:
Originally posted by MarshalMix

I don't think of people as stupid.
Just rigidly opposed to learning.


I have got to remember that one! <
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07