how make sending POST safe !

hello
15 Replies
NIMA
NIMA3w ago
i just php few weeks and i want know how can i make sending input value with post more safe and stronger for avoid hacker hack data base and .... i use preg_match and mysqli_real_escape_string and validte all input but i still dont know its safe or no
ἔρως
ἔρως3w ago
we can't tell you it's impossible to answer
NIMA
NIMA3w ago
🤔
ἔρως
ἔρως3w ago
what you're asking is an unsolved problem "gives any program, tell me if it's safe" that's what you're asking
NIMA
NIMA3w ago
ye i know but what is best thing for avoid it for now
ἔρως
ἔρως3w ago
if you want a review on a piece of code, then that's different a lot of things like, an almost uncountable list of things one thing i can tell you for sure: never trust any used input seriously, without seeing some code, nobody can answer that just so you know, there are situations in which mysqli_real_escape_string is unsafe
NIMA
NIMA3w ago
ohhh so this is not good for avoid sql injecshen
ἔρως
ἔρως3w ago
i can't answer that
NIMA
NIMA3w ago
is there any where u know i can read more about this stuff ?
13eck
13eck3w ago
Simple answer: you can’t Complex answer: there’s an entire field devoted to security Mid-tier answer: there are a few things you can do to be safer
ἔρως
ἔρως3w ago
the php documentation warns about some things to avoid, but without seeing your code, nobody can say anything for sure
13eck
13eck3w ago
Input validation and string sanitation are two of the lower-hanging fruits. As epic said: never trust user input But really, this ☝️ If you have specific code you have questions about we can help more then generalities
ἔρως
ἔρως3w ago
and you have to make sure that what goes out is safe, not just what goes into the database
13eck
13eck3w ago
You can start with the OWASP Top 10 critical issues facing developers. Then move on to their cheatsheets series for more in-depth info about specific topics.
NIMA
NIMA3w ago
big tnx
Want results from more Discord servers?
Add your server