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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 General Question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

lsakizada
New Member

USA
90 Posts

Posted - 22 August 2003 :  03:45:19  Show Profile
I am passing variable ('PortalContentId')between pages that at some point this variable save in database. This is the syntax:

classViewAds.asp?catID=6&PortalContentId=1

If a user will change the value then my database will be populated
with wrong data. lets say:
classViewAds.asp?catID=6&PortalContentId=foo
How to prevent that.

Please help..

lsakizada
New Member

USA
90 Posts

Posted - 22 August 2003 :  04:07:33  Show Profile
BTW: I am working on the Classified mod...
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 22 August 2003 :  04:14:47  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
I would check if the querystring values are numeric:
If NOT IsNumeric(Request.QueryString("catID")) or NOT IsNumeric(Request.QueryString("PortalContentID")) Then Response.Redirect("anypage.asp")

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

lsakizada
New Member

USA
90 Posts

Posted - 22 August 2003 :  04:26:44  Show Profile
OWM, thanks for the quick reply, but this not help me much
I guess my problem is not about the type of the datatype.
the point is that the value of this variable can be change by any user (changing the url), so I will end up with wrong data in my table.
Beside of that, user can insert large size variable which can cause to database error.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 22 August 2003 :  04:32:43  Show Profile
you will need to do some checking before inserting to check for size and such. instead of passing the value in the querystring, why not pass the value in a form?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 22 August 2003 :  04:39:03  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:
OWM, thanks for the quick reply, but this not help me much
I guess my problem is not about the type of the datatype.

You're wrong, you always should check the data before inserting it into the database for both the correct type and allowed values because it may cause errors.
I also recommend using a form to pass the data.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

lsakizada
New Member

USA
90 Posts

Posted - 22 August 2003 :  04:46:04  Show Profile
Checking the size is a good idea and will solve the problem with inserting large size.
bTW: The basic Classified mod actually does not checking size..

Passing it by the form needs much more planning and I guess much more difficult to implement then passing it by querystring.
my work is to integrate the Portal with Classified mod


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.48 seconds. Powered By: Snitz Forums 2000 Version 3.4.07