Click here to Skip to main content
16,011,170 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Can't execute ANY VBScript Pin
Vasudevan Deepak Kumar5-Nov-02 16:19
Vasudevan Deepak Kumar5-Nov-02 16:19 
GeneralSubmitting the site... Pin
Sarvesvara (BVKS) Dasa4-Nov-02 23:26
Sarvesvara (BVKS) Dasa4-Nov-02 23:26 
GeneralRe: Submitting the site... Pin
benjymous5-Nov-02 0:34
benjymous5-Nov-02 0:34 
GeneralRe: Submitting the site... Pin
Sarvesvara (BVKS) Dasa6-Nov-02 1:19
Sarvesvara (BVKS) Dasa6-Nov-02 1:19 
GeneralRe: Submitting the site... Pin
Vasudevan Deepak Kumar5-Nov-02 16:31
Vasudevan Deepak Kumar5-Nov-02 16:31 
GeneralRe: Submitting the site... Pin
Sarvesvara (BVKS) Dasa6-Nov-02 1:22
Sarvesvara (BVKS) Dasa6-Nov-02 1:22 
GeneralClient side validation Pin
alex.barylski3-Nov-02 22:24
alex.barylski3-Nov-02 22:24 
GeneralRe: Client side validation Pin
Pete Bassett3-Nov-02 23:34
Pete Bassett3-Nov-02 23:34 
Hi, your main question is about validation of the user really isn't it?

Are you requireing the user to be logged in before allowing them to post? If so, simple checks for a login id stored in Session would suffice to check if the post was coming from a valid place.

Another thing. In ASP if you dont want to have stuff like DROP TABLE run, just use the command object. You shouldn't ever build an SQL string if you cant trust the source.

E.g. "Select * From Customer Where Name = '" & strName & "'"

Can be broken by typing in

' DROP TABLE Customer --

Which would build the SQL string

Select * From Customer Where Name = '' DROP TABLE Customer -- '

All is lost! Fires of Hell!

So, just use the Command object instead.

E.g. (Off the top of my head)

Dim objCommand as new Command

set objCommand.ActiveConnection = objConn ' Get the connection elsewhere
objCommand.CommandText = "Select * From Customer Where Name = '@Name'"
objCommand.parameters.Add("@Name", strName)

dim rs as Recordset
set rs = objCommand.Execute


I cant remember which version of ASP/ADO you need to run names parameters but its in there somewhere, unless I'm completely forgetting something.

Executing this code should really check for the presence of a name "' DROP TABLE Customer --" in the customer.Name field rather than executing the code.

So, using these two methods you dont really need to worry where things come from. So, write your client side profanity stripper and if the user isn't logged on, dont let them post.


Pete

Insert Sig. Here!
GeneralRe: Client side validation Pin
markkuk4-Nov-02 1:51
markkuk4-Nov-02 1:51 
GeneralRe: Client side validation Pin
alex.barylski4-Nov-02 21:29
alex.barylski4-Nov-02 21:29 
GeneralRe: Client side validation Pin
Pete Bassett4-Nov-02 22:05
Pete Bassett4-Nov-02 22:05 
GeneralRe: Client side validation Pin
alex.barylski5-Nov-02 6:14
alex.barylski5-Nov-02 6:14 
GeneralRe: Client side validation Pin
markkuk5-Nov-02 8:49
markkuk5-Nov-02 8:49 
GeneralRe: Client side validation Pin
Vasudevan Deepak Kumar5-Nov-02 16:35
Vasudevan Deepak Kumar5-Nov-02 16:35 
GeneralRe: Client side validation Pin
alex.barylski6-Nov-02 9:16
alex.barylski6-Nov-02 9:16 
GeneralIE colspan bug Pin
leppie3-Nov-02 5:51
leppie3-Nov-02 5:51 
GeneralRe: IE colspan bug Pin
Stephane Rodriguez.3-Nov-02 6:37
Stephane Rodriguez.3-Nov-02 6:37 
GeneralRe: IE colspan bug Pin
leppie3-Nov-02 7:39
leppie3-Nov-02 7:39 
GeneralRe: IE colspan bug Pin
Paul Watson3-Nov-02 20:09
sitebuilderPaul Watson3-Nov-02 20:09 
GeneralRe: IE colspan bug Pin
leppie4-Nov-02 8:21
leppie4-Nov-02 8:21 
GeneralRe: IE colspan bug Pin
Paul Watson4-Nov-02 8:23
sitebuilderPaul Watson4-Nov-02 8:23 
GeneralRe: IE colspan bug Pin
Roger Wright4-Nov-02 10:16
professionalRoger Wright4-Nov-02 10:16 
GeneralRe: IE colspan bug Pin
leppie5-Nov-02 6:26
leppie5-Nov-02 6:26 
GeneralBest font opinion Pin
leppie3-Nov-02 3:31
leppie3-Nov-02 3:31 
GeneralRe: Best font opinion Pin
Paul Watson3-Nov-02 4:45
sitebuilderPaul Watson3-Nov-02 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.