in reply to Re: Any security holes?
in thread Any security holes?
> to help mitigate this is to escape any strings ... HTML::Entities.
Yes escaping mitigates injections, and is a good first workaround.
But I always prefer to strictly reject any unexpected character.
For instance, why should an input "age" include anything else than digits, why "name" more than word characters plus maybe . - and ' ?
Additionally: In my applications I apply the exact same regex filter rules via JS input validators on the client side too.²
Like this I can not only reject broken input on the server side, but also raise an alarm about an intentional manipulation. °
All this of course plus escaping or use of placeholders on all interpreted levels (HTML,JS,Perl,SQL,...).
Security is best provided by multiple lines of defense.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) thats part of OWASP too.
²) thankfully, JS copied Perl4 Regex rules almost completely
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Any security holes?
by hippo (Archbishop) on Jun 26, 2022 at 19:41 UTC | |
by Your Mother (Archbishop) on Jun 26, 2022 at 19:47 UTC | |
by LanX (Saint) on Jun 26, 2022 at 20:21 UTC | |
by Jenda (Abbot) on Jun 27, 2022 at 19:55 UTC | |
|
Re^3: Any security holes?
by hv (Prior) on Jun 26, 2022 at 17:54 UTC | |
by LanX (Saint) on Jun 26, 2022 at 18:10 UTC | |
by Your Mother (Archbishop) on Jun 26, 2022 at 19:46 UTC |