We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

POST Variables

Development and Programming

ryal001's avatar
ryal001
42 posts
16 years ago
ryal001's avatar ryal001

Hi,

If I clean the POST variable thus:

$_POST = $REGX->xss_clean( $_POST );

Should I still access the individual variables via the Input class:

$new_num_rows = $IN->GBL('total_rows', 'POST');

Or is this just doubling up?

       
ryal001's avatar
ryal001
42 posts
16 years ago
ryal001's avatar ryal001

I can only assume this question is too hard or too dumb, but I don’t know which?

       
ryal001's avatar
ryal001
42 posts
16 years ago
ryal001's avatar ryal001

My concern is that accessing POST variables via the $IN class may be needlessly using more resources than just using $_POST[‘my_variable’] if the security added by using the $IN class merely repeats what $REGX->xss_clean( $_POST ) has already done.

Hope this makes sense.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

I could be wrong about what it all means but I don’t think that data is sanitised merely by using the $IN class at least not for $_POST data anyway.

More information can be found here although I might be misunderstanding though.

Best wishes,

Mark

       
ryal001's avatar
ryal001
42 posts
16 years ago
ryal001's avatar ryal001

Thanks Mark, the link you provided seems to make it quite clear that $IN does not sanitise POST variables. However, the documentation for the Input class seems to imply that it does clean the POST variables (at least it doesn’t specify that they are not cleaned).

Unless I hear otherwise, I think it would be best to assume that the Input class does not clean the POST variables.

       
ryal001's avatar
ryal001
42 posts
16 years ago
ryal001's avatar ryal001

Thanks; that clears things up I think.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.