Skip to content

Instantly share code, notes, and snippets.

@kharissulistiyo
Last active November 16, 2024 01:04
Show Gist options
  • Save kharissulistiyo/b668854c6faa9faf4bb591cc08612347 to your computer and use it in GitHub Desktop.
Save kharissulistiyo/b668854c6faa9faf4bb591cc08612347 to your computer and use it in GitHub Desktop.
Bad code sample: SQL injection vulnerability
<?php
foreach ($value as $k => $attr) {
$where .= " \n {$_or} ( list_attr_rel_" . $i . ".value = {$attr})";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment