Skip to content

Instantly share code, notes, and snippets.

@kharissulistiyo
Created November 16, 2024 12:32
Show Gist options
  • Save kharissulistiyo/649031f06e6a718812d8f8145b569692 to your computer and use it in GitHub Desktop.
Save kharissulistiyo/649031f06e6a718812d8f8145b569692 to your computer and use it in GitHub Desktop.
Bad PHP code sample: PHP Object Injection vulnerability
<?php
foreach ($post_data as $key => $value) {
$post_data_keys = ['billing_country', 'card_zip', 'card_cvc'];
if ( ! in_array($key, $post_data_keys, true)) {
continue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment