Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kharissulistiyo/4017b66ef8e08b7f3679ee76c152489f to your computer and use it in GitHub Desktop.
Save kharissulistiyo/4017b66ef8e08b7f3679ee76c152489f to your computer and use it in GitHub Desktop.
Bad PHP code sample: Path Traversal vulnerability
<?php
if ( Input::has( 'sub_page' ) ) {
$sub_page = Input::get( 'sub_page' );
include_once tutor()->path . "views/pages/{$sub_page}.php";
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment