Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
al2o3cr
· 12y ago · 0 comments
The motto of PHP devs is apparently "F
KIN ESCAPING, HOW DOES IT WORK?". Use escapeshellarg, kids.
Comments
[–]
code_duck
12y ago
I didn't intend for this to represent the entire code for the search function. I've never written a php page that did something unsafe with user input. After all, '$terms' is not not $_GET['terms'] in my silly example. It's not defined.
[–]
mcguire
12y ago
escapeshellarg misses some cases. You need to use escapeshellarg_fixed.
[–]
jrockway
12y ago
real_escapeshellarg_fixed, you mean.