Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Members List Enhanced Plugin - IP Addresses not showing up properly with Vanilla 2.5.1

brainolutionbrainolution ✭✭
edited February 2018 in Vanilla 2.0 - 2.8

I just upgraded to Vanilla 2.5.1 and switched to PHP 7.2. I have the latest v6.6 of Members List Enhanced plugin. I found that the plugin is not showing the IP addresses correctly. See the screenshot below. I also noticed that clicking on the column headers doesn't sort the rows by that column.

Comments

  • RiverRiver MVP
    edited February 2018

    vanilla 2.5.1 has changed the way it stores ip addresses in database

    which will require decoding •

    generally you must decode $values retrieved from database that are ip addresses.

    $decodedIP = ipDecode($theipaddressvalue);

    echo $decodedIP;

    in the plugin look for file views/memtable.php

    look for line

    echo '<td>' . $User->LastIPAddress . '</td>';

    it must be decoded first with ipDecode

    echo '<td>' . ipDecode($User->LastIPAddress) . '</td>';

    https://open.vanillaforums.com/discussion/comment/251091/#Comment_251091

    you may need to place an addon.json in the plugin

    "type":"addon",
    "key":"MembersListEnh",
    "name":"MembersListEnh",
     "usePopupSettings":false 
    

    see https://open.vanillaforums.com/discussion/comment/251629/#Comment_251629

    see https://docs.vanillaforums.com/developer/addons/addon-info/

    and

    https://open.vanillaforums.com/discussion/35697/general-2-5-plugin-compatibility-issues

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • RiverRiver MVP
    edited February 2018

    @brainolution said:
    I just upgraded to Vanilla 2.5.1 and switched to PHP 7.2. I have the latest v6.6 of Members List Enhanced plugin. I found that the plugin is not showing the IP addresses correctly. See the screenshot below. I also noticed that clicking on the column headers doesn't sort the rows by that column.

    Besides the ip fix above...

    A few things to add

    in the plugin

    to fix settings screen....

    look for default.php and edit file

    add below this line

    'SettingsUrl' => '/dashboard/settings/memberslistenh',

    add

    "UsePopupSettings" => false,

    (or create complete addon.json)

    if you want the column sorting to work your rewrite rules need to allow the urls's to work.

    the .htaccess in 2.5.1 prevents the column sorting via clicking on headers.

    you have a few choices

    • Best choice - create your new rule that allows the membership column sorting to work but still keeps forum secure.

    • Another choice - use the old .htaccess

    located here https://github.com/vanilla/vanilla/blob/Vanilla_2.2/.htaccess

    -Another choice modify the 2.51 .htaccess

    within .htaccess

     # Redirect any non existing file/directory to /index.php 
     #### 
     RewriteCond %{REQUEST_FILENAME} !-f 
    #commented out line below
    # RewriteRule (.*) index.php [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L] 
    #add next line
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    

    I think this is the line that prevents the column sorting when you click headers.

    RewriteRule (.*) index.php [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]

    However, I don't know how this affects security.

    Best if you can figure out specific rule or let a rules rewrite expert help you.

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Thanks a lot for the detailed and very helpful responses. The IP address issue was resolved. I didn't have a problem with the settings screen. So, I skipped the steps related to it. About rewrite rules, I'll leave it as it is for now, instead of risking potential security issues. Thanks again!

Sign In or Register to comment.