Re: setcookie security concerns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An interesting question in this case is how to do an injection using
cookies, injection attacks are generally performed using post & get data
as they can be inserted to a link on another page.  Getting a working
exploit would probably come down to how the browser implemented the
cookie security; who can set cookies where.

Regardless, it's not worth the risk.  Checking for valid values or using
htmlentities to make the variable safe is a quick and simple solution.
Getting into the practice of screening all user data either manually or
using the input_filter extension will also save you from these problems
in the future.


David

David:

I thank you for your explanation.

I experienced an injection attack on a php-form I wrote/provided where someone entered an incomplete html tag that created problems for the form. So, I realize the potential, I just don't know the scope of those types of problems and that was one of the reasons why I asked about this specific cookie issue.

What could a hacker do by injecting whatever into a cookie that resides client-side on his computer?

tedd

ps: With the form, I solved it by using htmlentities

--
--------------------------------------------------------------------------------
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux