Form security |
Hey,
I'm quite new to codeigniter and am now trying to secure my form against all possible attacks. This is how my form looks like: Code: <?= form_open('auth/registerUser') ?> and this is how my php code to validate the data looks like: PHP Code: public function registerUser() are there some security issues? Currently when I enter a username like: <h1> test </h1> it gets changed to <h1> test </h1> How can I avoid this changement without security issues? Or how could I add blacklisted characters?
Please read this in the CodeIgniter Users Guide.
CodeIgniter Users Guide - Build Your First Application See: the part about Create News Items. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
07-28-2022, 01:05 AM
(This post was last modified: 07-28-2022, 01:24 AM by captain-sensible. Edit Reason: wait theres more )
As nobody has answered i will throw something in:
Code: <?= $this->extend('layout') ?> For the term "security" my approach looks at any abuse to form and likely threat but with a modicum of a reality check I use bootstrap so my form fields start and end with form-group lets have a look at my experience with issues 1) The most prevalent abuse is spam. IN my form i only want their name , email to get back to them and a brief message.Spammers almost always include a url link to some product. So in regard to this , i use Code: $message= $this->request->getVar('message'); 2) The other possible abuse might be from bots , so there is a bot field in form 3) When i ran owasp program it mainly came up with csrf . With a web that has relatively few hits the risk of attack must be less than a site than a million or so. I put a csrf field into form. with both honeypot and csrf you have to enable use . See docs. I have never experienced any other thing with form to worry about in reality for web dev on local host i've used this before : https://www.zaproxy.org/getting-started/ |
Welcome Guest, Not a member yet? Register Sign In |