Skip to content

Instantly share code, notes, and snippets.

@jrtashjian
Created August 11, 2011 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrtashjian/1139779 to your computer and use it in GitHub Desktop.
Save jrtashjian/1139779 to your computer and use it in GitHub Desktop.
<?php
// not safe
exec($_GET['query']);
exec( addslashes($_GET['query']) );
// THE SAFE ROUTE
exec( escapeshellarg($_GET['query']) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment