Skip to content

Commit 7e8ea57

Browse files
author
Benjamin Pick
committed
Remove deprecated shortcode syntax
1 parent 1f49092 commit 7e8ea57

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

deprecated.php

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,4 @@ function geoip_detect_get_abs_db_filename()
2020
if (is_object($reader) && method_exists($source, 'maxmindGetFilename'))
2121
return $source->maxmindGetFilename();
2222
return '';
23-
}
24-
25-
26-
27-
/**
28-
* @deprecated shortcode
29-
*/
30-
function geoip_detect_shortcode($attr)
31-
{
32-
$userInfo = geoip_detect_get_info_from_current_ip();
33-
34-
$defaultValue = isset($attr['default']) ? $attr['default'] : '';
35-
36-
if (!is_object($userInfo))
37-
return $defaultValue . '<!-- Geolocation IP Detection: No info found for this IP. -->';
38-
39-
$propertyName = $attr['property'];
40-
41-
42-
if (property_exists($userInfo, $propertyName)) {
43-
if ($userInfo->$propertyName)
44-
return $userInfo->$propertyName;
45-
else
46-
return $defaultValue;
47-
}
48-
49-
return $defaultValue . '<!-- Geolocation IP Detection: Invalid property name. -->';
50-
}
51-
add_shortcode('geoip_detect', 'geoip_detect_shortcode');
23+
}

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ If you are using AJAX mode, please read the changelog.
136136

137137
= 5.5.1 =
138138
* FIX: Compatibility with Wordpress 6.7 (Textdomain loading)
139+
* FIX [!]: Remove deprecated shortcode [geoip_detect] (Security - CVE-2025-57993)
139140

140141
= 5.5.0 =
141142
* FIX [!]: In the datasource "hostip.info", the region code (i.e. CA) is now correctly moved to the property `mostSpecificSubdivision` (previously, it was part of the property `city`)

0 commit comments

Comments
 (0)