Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Suggestion for function IsValidString

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
MarshalMix Posted - 29 August 2006 : 20:37:49
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.
<
5   L A T E S T    R E P L I E S    (Newest First)
AnonJr Posted - 31 August 2006 : 15:07:47
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! <
MarshalMix Posted - 31 August 2006 : 13:38:11
Agreed.
Actually, I don't think of people as stupid.
Just rigidly opposed to learning.

Regards.
<
Shaggy Posted - 31 August 2006 : 08:10:22
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!

<
MarshalMix Posted - 31 August 2006 : 01:20:41
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.
<
HuwR Posted - 30 August 2006 : 03:06:18
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<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07