minicl55

Untitled

Oct 10th, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. //Check for SQLi everywhere
  2.  
  3. foreach($_POST as $key => $value)
  4. {
  5. if (strpos($value,';') or strpos($value,"`") or strpos($value,"'"))
  6. {
  7. die ('Please refrain from using a semicolon (;), single quote (\') or a backtick (`). Due to a technical error there are certain scenarios where this could cause the database to do unwanted things. Fixing this is on my high-priority list and will be done soon.');
  8. }
  9. }
  10.  
  11. foreach($_GET as $key => $value)
  12. {
  13. if (strpos($value,';') or strpos($value,"`"))
  14. {
  15. die ('Please refrain from using a semicolon (;), single quote (\') or a backtick (`). Due to a technical error there are certain scenarios where this could cause the database to do unwanted things. Fixing this is on my high-priority list and will be done soon.');
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment