Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kharissulistiyo/0a27092cb7fe65453af21cd4c7e4c00c to your computer and use it in GitHub Desktop.
Save kharissulistiyo/0a27092cb7fe65453af21cd4c7e4c00c to your computer and use it in GitHub Desktop.
Bad PHP code sample: Local File Inclusion vulnerability
<?php
$style = isset( $settings['pricing_table_style'] ) ? $settings['pricing_table_style'] : 'style-1';
?>
<div <?php echo $element->get_render_attribute_string( 'pricing_attr' ) ?>>
<div <?php echo $element->get_render_attribute_string( 'inner_attr' ) ?>>
<?php ube_get_template( "elements/pricing-table/{$style}.php", array(
'element' => $element,
'settings' => $settings,
) ); ?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment