Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
That's JavaScript, right? That $page variable is a JavaScript variable, and he's filling that policy_err variable from PHP when rendering the output.
Or maybe he has mixed one with the other thinking (like many starters do) that they can run PHP code just like that from client code? -
xewl41266y@linuxxx @PrivateGER
echo 'var say=' . (!empty($_GET['what']) && is_string($_GET['what']) ? '"'.escape_str($_GET['what']).'"' : 'null' ) . ';'; -
xewl41266y@PrivateGER probably.. depends on how/where exactly u'd use it (thinking eg. a dynamically built .js file/endpoint)
-
stacked26696yThat code is actually a great cross-site scripting opportunity. Your coworker is a genius if he/she is planning to steal from your company, or trick your users. But most probably is an idiot. Yes, he's an idiot.
Related Rants
Don't know if the author is a genius or an idiot. Thoughts ?
rant
js
php