![]() |
Misleading passage in user_guide - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Misleading passage in user_guide (/showthread.php?tid=6728) Pages:
1
2
|
Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]Michael Wales[/eluser] Quote:I’ve been guilty of relying on the database class cleaning by passing uri segments to the query but lets say the segment needs to be a number but it is a string with validation the rendering should be stopped before querying the database. With the current validation library it’s impossible to do Code: function getPost($id = NULL) { Maybe I am missing something or the intent of your comments xwero? Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]xwero[/eluser] I did a similar, unnessecary, redirect for the pagination library. I know you can do these checks using common code but it would be nice if you could do it like this Code: function getPost($id = NULL) { Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]Majd Taby[/eluser] no it's cool, i thought I might bring it to somebody's attention. but to give my 2 cents, GET isn't any less secure than POST, you can send any info you want into POST (look at the temper extention for firefox). The way CI handles URLs sure looks pretty, but there's no strong binding between the key and the value. Moreover, what's to stop somebody from modifying the pretty url? and finally, it's up to the developer to make the GET url secure, same way it's up to the developer to make mySQL, javascript, and everything else secure. Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]xwero[/eluser] i think if you configure CI with Code: $config['uri_protocol'] = 'AUTO'; Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]Majd Taby[/eluser] I couldn't tell you for sure, but CodeExtinguisher is working interchangeably. Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]xwero[/eluser] I checked it and the uri segment method doesn't work when there is a query string as url. In order to get the segment you have to use GET[''] or the CI input->get(''). I did another test with a parameter in the method Code: function somepage($test) I like the pathinfo urls but if you are changing from pathinfo to query string url you are going to have to rewrite all segment caching code. Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]Majd Taby[/eluser] ah I see, there's a misunderstanding, I meant to say that I can use regular CI-style url's and use segment(3), or I can use regular GET urls...not mix them together. Misleading passage in user_guide - El Forum - 03-10-2008 [eluser]xwero[/eluser] So for CI people who use query strings make things harder for themselves because all CI does is loading the class and the method? |