Plugin Directory

Opened 10 years ago

Last modified 10 years ago

#2498 new defect

Rewrite get_ip() method to use PHP native functions in uploads-by-proxy

Reported by: davidthemachine's profile davidthemachine's profile DavidTheMachine Owned by:
Priority: normal Severity: major
Plugin: not-listed Keywords:
Cc:

Description

The present implementation of get_ip() relies on querying remote websites, one of which, hostnametoip.com, is no longer around, leading to an error cascade which breaks the plugin's functioning.

The line referencing this domain can be safely commented out, but it's more portable and reliable to use PHP's built-in functions for DNS lookups. The end result is this patch which has a rewrite for the get_ip method.

Attachments (2)

get_ip.patch (15.6 KB) - added by DavidTheMachine 10 years ago.
get_ip.2.patch (3.1 KB) - added by DavidTheMachine 10 years ago.
this time, using a proper diff

Download all attachments as: .zip

Change History (3)

#1 @DavidTheMachine
10 years ago

  • Summary changed from Rewrite get_ip() method to use PHP native functions to Rewrite get_ip() method to use PHP native functions in uploads-by-proxy

@DavidTheMachine
10 years ago

this time, using a proper diff

Note: See TracTickets for help on using tickets.