Unverified Commit d0d0056c authored by Lester Chan's avatar Lester Chan
Browse files

Hashed IP instead

parent bb1cecfb
......@@ -28,7 +28,7 @@ I spent most of my free time creating, updating, maintaining and supporting thes
## Changelog
### Version 2.74
* NEW: Anonymize IP and Hostname to make it GDPR compliance
* NEW: Hashed IP and anonymize Hostname to make it GDPR compliance
### Version 2.73.8
* FIXED: Bug fixes and stricter type checking
......
......@@ -325,7 +325,7 @@ if( ! empty( $_POST['do'] ) ) {
echo "<tr class=\"thead\">\n";
echo "<th>".__('No.', 'wp-polls')."</th>\n";
echo "<th>".__('User', 'wp-polls')."</th>\n";
echo "<th>".__('IP/Host', 'wp-polls')."</th>\n";
echo "<th>".__('Hashed IP / Host', 'wp-polls')."</th>\n";
echo "<th>".__('Date', 'wp-polls')."</th>\n";
echo "</tr>\n";
$i = 1;
......
......@@ -734,12 +734,12 @@ if(!function_exists('get_ipaddress')) {
}
}
function poll_get_ipaddress() {
return wp_privacy_anonymize_ip( get_ipaddress() );
return wp_hash( get_ipaddress() );
}
function poll_get_hostname() {
$hostname = gethostbyaddr( get_ipaddress() );
if ( $hostname === get_ipaddress() ) {
return poll_get_ipaddress();
return wp_privacy_anonymize_ip( get_ipaddress() );
}
if ( false !== $hostname ) {
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment