Skip to content

Commit dbfbd22

Browse files
author
Daniel Neto
committed
Refactor API secret validation to use dedicated method for improved clarity
1 parent 16a98ee commit dbfbd22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugin/API/API.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4226,8 +4226,7 @@ public function get_api_IP2Location($parameters)
42264226
{
42274227
global $global;
42284228
$this->getToPost();
4229-
$obj = $this->getDataObject();
4230-
if ($obj->APISecret !== @$_GET['APISecret']) {
4229+
if (!self::isAPISecretValid()) {
42314230
return new ApiObject("APISecret Not valid");
42324231
}
42334232
if (AVideoPlugin::isEnabledByName("User_Location")) {

0 commit comments

Comments
 (0)