- fixed directory traversal vulnerability;

This commit is contained in:
Nikita Sinelnikov
2022-09-27 13:58:01 +03:00
parent 7bff69f52b
commit 14dc36b813
+3
View File
@@ -276,6 +276,9 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
extract( $args );
}
// Avoid Directory Traversal vulnerability.
$tpl = trim( $tpl, "./\\" );
$file = um_path . "templates/{$tpl}.php";
$theme_file = get_stylesheet_directory() . "/ultimate-member/templates/{$tpl}.php";
if ( file_exists( $theme_file ) ) {