Welcome Guest, Not a member yet? Register   Sign In
URI Segment Database Safety
#1

[eluser]nullsys[/eluser]
Hi all!
I'm sure this is fairly standard stuff, but it's better to be safe than sorry (pun not intended).

I'm working with pulling $this->uri->segment(n) data to query an ID in the database. Fairly standard stuff.
But, do I need to run my own validation and security for this before sending it through Active Record?

I'm already ensuring the uri->segment is a valid number by doing the following:
Code:
preg_match('/^-?[0-9]+$/', (string)$param)

Can anyone think of anything else I might need to do (if anything) before sending it to Active Record?

Thanks in advance.


Messages In This Thread
URI Segment Database Safety - by El Forum - 06-28-2012, 04:17 PM
URI Segment Database Safety - by El Forum - 06-28-2012, 08:37 PM
URI Segment Database Safety - by El Forum - 06-29-2012, 03:28 AM
URI Segment Database Safety - by El Forum - 06-29-2012, 04:52 AM
URI Segment Database Safety - by El Forum - 06-29-2012, 05:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB