• Hi,

    I found some issue when usign NewStatPress with changed content directory.
    You can define different content directory than the default wp-content, plugins such as Better WP Security persuade you to do it for security reson.
    What’s the problem with NewStatPress:
    in main file (newstatpress.php) in line 1742
    $lines = file(ABSPATH.'wp-content/plugins '.dirname(plugin_basename(__FILE__)).'/def/banips.dat');
    it assumes the content dir is always wp-content. the line should be:
    $lines = file(WP_PLUGIN_DIR . '/' .dirname(plugin_basename(__FILE__)).'/def/banips.dat');

    I don’t know if there are more lines like this, I just found this one. Please change it in future releases. Thank you

    https://ww.wp.xz.cn/plugins/newstatpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Wojtek Szałkiewicz

    (@szaleq)

    Found more lines:
    1090, 1224, 1289, 1709, 1726, 1758, 1783, 2095, 2096, 2097, 2222, 2245, 2268;

    All this lines looks like:
    ABSPATH.'wp-content/plugins/'.dirname(plugin_basename(__FILE__)).'filename'
    It would be better to do some global:

    global $newstatpress_dir;
    $newstatpress_dir = WP_PLUGIN_DIR . '/' .dirname(plugin_basename(__FILE__));

    Then you could just do: $newstatpress_dir.'filename'; just a suggestion 🙂

    Thanks for the great plugin though 😀

    Plugin Author ice00

    (@ice00)

    hi,

    thanks for find them out.
    I’m adding to current being reelased version

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘FIX: bug with changed content dir’ is closed to new replies.