-
AuthorPosts
-
August 12, 2019 at 9:08 pm #1126996
Ran a security scan using Defender Pro and the following came back as suspicious functions. Please advise.
ACTIONS.PHP
File location:/wp-content/themes/enfold/config-layerslider/LayerSlider/wp/actions.phpFound 2 issues.
The function file_put_contents line 1027 column 3 execute using unsanitize user inputs
// Attempt to save changes if( is_writable( $upload_dir['basedir'] ) <strong>) { file_put_contents( $file, stripslashes( $_POST['contents</strong>'] ) ); wp_redirect( admin_url( 'admin.php?page=layerslider-options§ion=css-editor&edited=1' ) ); die();
The function file_put_contents line 1056 column 3 execute using unsanitize user inputs
// Attempt to write the file if( is_writable( $f<strong>ile ) ) { file_put_contents( $file, stripslashes( $_POST['c</strong>ontents'] ) ); wp_redirect( admin_url( 'admin.php?page=layerslider-options§ion=skin-editor&edited=1&skin='.$skin['handle'] ) ); die(); } else { wp_die( __('It looks like your files isn’t writable, so PHP couldn’t make any changes (CHMOD).', 'LayerSlider'), __('Cannot write to file', 'LayerSlider'), array('back_link' => true) ); } }
FUNCTION-SET-AVIA-AJAX.PHP
File Location: /wp-content/themes/enfold/framework/php/function-set-avia-ajax.phpFound 1 issues.
The function unserialize line 629 column 18 unserialize an user inputs
if(is_array($result)) { $html = new avia_htmlhelper(); $new_slug = $result['slug']; $result = "{avia_ajax_option_page}" .$html->create_container_based_on_slug($result) ."{/avia_ajax_option_page}"; if(isset($_POST['defaul_elements'])) { $elements = <strong>unserialize( base64_decode( $_POST['defaul_elements'] ) );</strong> $result .= "{avia_ajax_element}"; foreach($elements as &$element) { $element['id'] = $new_slug . $element['id']; $element['slug'] = $new_slug; //create frontend output $result .= $html->render_single_element($element);
August 17, 2019 at 6:21 am #1128451Hey Mahdi,
Sorry for the late reply, I have compared these to our files and they are correct.
This is as our dev team has intended.
Unless there is anything else we can assist with on this issue, shall we close this then?Best regards,
MikeAugust 19, 2019 at 4:43 pm #1128952I would suggest adding these for further review by the dev team, particularly the unsanitized user inputs, as they present a potential attack vector.
If not, I would appreciate a response from the dev team acknowledging the issues and an explanation as to why it is an accepted risk or otherwise suggesting mitigating factors.
-Mahdi Hedhli
GoVanguardAugust 19, 2019 at 5:19 pm #1128958August 20, 2019 at 3:56 am #1129080Hi,
@mhedhli, I have sent this request.
Thank you for your patience for a reply.Best regards,
MikeAugust 20, 2019 at 1:33 pm #1129211Hi,
File location:/wp-content/themes/enfold/config-layerslider/LayerSlider/wp/actions.php
This file is part of the layerSlider plugin. We did not change anything there.
File Location: /wp-content/themes/enfold/framework/php/function-set-avia-ajax.php
The function avia_ajax_create_dynamic_options is no longer in use in Enfold. This file is part of the backend framework and was used in outdated themes.
If you feel better in line 656 you can avoid calling this function by replaceingadd_action('wp_ajax_avia_ajax_create_dynamic_options', 'avia_ajax_create_dynamic_options');
with
// add_action('wp_ajax_avia_ajax_create_dynamic_options', 'avia_ajax_create_dynamic_options');
Best regards,
GünterSeptember 9, 2019 at 6:04 pm #1136156Günter,
Thank you. Instead of us commenting this out with every update, can you or one of the dev team add a PR to remove these antiquated/no longer in use functions?
Thanks,
MahdiSeptember 10, 2019 at 2:18 pm #1136549September 10, 2019 at 5:33 pm #1136638 -
AuthorPosts
- You must be logged in to reply to this topic.