Skip to content

Commit 5918c74

Browse files
style: run prettier on changed files
1 parent 70029c8 commit 5918c74

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Auth.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ class Auth {
296296
$matched_auth = $auth;
297297
self::log(
298298
level: LOG_DEBUG,
299-
message: "Client from $auth->ip_address is attempting to authenticate using $auth->verbose_name."
299+
message: "Client from $auth->ip_address is attempting to authenticate using $auth->verbose_name.",
300300
);
301301
break;
302302
}

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Endpoint.inc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ class Endpoint {
635635
) {
636636
$this->log(
637637
level: LOG_WARNING,
638-
message: "Denied {$this->client->username}@{$this->client->ip_address} access to $this->url for REST ".
639-
"API access list violation."
638+
message: "Denied {$this->client->username}@{$this->client->ip_address} access to $this->url for REST " .
639+
'API access list violation.',
640640
);
641641
throw new ForbiddenError(
642642
message: 'The requested action is not allowed by admin policy',
@@ -652,10 +652,7 @@ class Endpoint {
652652
$client_ip = $_SERVER['REMOTE_ADDR'];
653653

654654
if (!$this->restapi_settings->enabled->value and !$this->ignore_enabled) {
655-
$this->log(
656-
level: LOG_WARNING,
657-
message: "Denied $client_ip access to $this->url as REST API is disabled."
658-
);
655+
$this->log(level: LOG_WARNING, message: "Denied $client_ip access to $this->url as REST API is disabled.");
659656
throw new ServiceUnavailableError(
660657
message: 'The REST API is currently not enabled.',
661658
response_id: 'ENDPOINT_REST_API_IS_NOT_ENABLED',
@@ -683,10 +680,7 @@ class Endpoint {
683680
}
684681

685682
# Loop through each allowed interface and check if the server IP is allowed to answer API calls
686-
foreach (
687-
$this->restapi_settings->allowed_interfaces->get_related_models()->model_objects
688-
as $allowed_if
689-
) {
683+
foreach ($this->restapi_settings->allowed_interfaces->get_related_models()->model_objects as $allowed_if) {
690684
# Allow the server IP if it matches the current interface's IPv4 or IPv6 address
691685
if ($server_ip === $allowed_if->get_current_ipv4()) {
692686
return;
@@ -705,7 +699,7 @@ class Endpoint {
705699
# Throw a forbidden error if this API call was made to a non-API enabled interface
706700
$this->log(
707701
level: LOG_WARNING,
708-
message:"Denied $client_ip access to $this->url as interface IP $server_ip is not allowed to respond."
702+
message: "Denied $client_ip access to $this->url as interface IP $server_ip is not allowed to respond.",
709703
);
710704
throw new ForbiddenError(
711705
message: 'The requested action is not allowed by admin policy',

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/RESTAPIJWT.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class RESTAPIJWT extends Model {
109109
# Log the action
110110
$this->log(
111111
level: LOG_INFO,
112-
message: "Client {$this->client->username}@{$this->client->ip_address} was issued a new JWT."
112+
message: "Client {$this->client->username}@{$this->client->ip_address} was issued a new JWT.",
113113
);
114114
}
115115
}

0 commit comments

Comments
 (0)