• Resolved Inekris

    (@inekris)


    Hi,

    Currently your plugin doesn’t support IPv6 whitelist addresses. To add IPv6 support is easy, change line 114 in ucOptions.php from:
    $ip = long2ip(ip2long($ip))
    in:
    $ip = inet_ntop(inet_pton($ip))

    To make sure it all goes well with packed addresses, change line 89 in underConstruction.php from:
    if(!in_array($_SERVER['REMOTE_ADDR'], $array))
    in:
    if(!in_array(inet_ntop(inet_pton($_SERVER['REMOTE_ADDR'])), $array))

    Maybe you could patch this in future versions of underConstruction.

    Jasper

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • FGD

    (@creativetopia)

    +1 on this please!

    Thx

    Plugin Author Garrett Grimm

    (@grimmdude)

    Thanks, this has been added in 1.17.

    -Garrett

    This seems to have been added to 1.17. However after updating the plugin it is giving the following errors:

    Warning: inet_pton(): Unrecognized address in /var/sites/a/example.com/public_html/wp-content/plugins/underconstruction/ucOptions.php on line 114

    Warning: inet_ntop(): Invalid in_addr value in /var/sites/a/example.com/public_html/wp-content/plugins/underconstruction/ucOptions.php on line 114

    Not sure if this might be due to incompatibility with the theme? Checked the files and the lines of code appear as mentioned above :S

    Have version 1.17 and that has the changed listed above. AND, still get errors after entering IPV6 and refreshing the page.

    Also getting the errors that WPNewbie mentions above.

    Since I don’t need that functionality I just commented out that line (114) in the file and the plugin now works.

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

The topic ‘[underConstruction] IPv6 support’ is closed to new replies.