OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
reader
/
aws-ses
/
vendor
/
aws
/
aws-sdk-php
/
src
/
S3
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📄
AmbiguousSuccessParser.php
2.3 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
ApplyChecksumMiddleware.php
4.98 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
BatchDelete.php
7.73 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
BucketEndpointArnMiddleware.php
14.04 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
BucketEndpointMiddleware.php
3.44 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
CalculatesChecksumTrait.php
1.84 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
Crypto
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📄
EndpointRegionHelperTrait.php
3.26 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
Exception
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📄
GetBucketLocationParser.php
1.34 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
MultipartCopy.php
9.06 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
MultipartUploader.php
6.3 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
MultipartUploadingTrait.php
4.24 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
ObjectCopier.php
5.99 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
ObjectUploader.php
5.52 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
PermanentRedirectMiddleware.php
1.76 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
PostObject.php
3.99 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
PostObjectV4.php
5.49 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
PutObjectUrlMiddleware.php
1.61 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
RegionalEndpoint
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📄
RetryableMalformedResponseParser.php
1.47 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
S3Client.php
52.19 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
S3ClientInterface.php
14.47 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
S3ClientTrait.php
10.56 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
S3EndpointMiddleware.php
11.39 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
S3MultiRegionClient.php
19.96 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
S3UriParser.php
5.07 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
SSECMiddleware.php
2.31 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
StreamWrapper.php
31.65 KB
05/19/2025 10:07:14 AM
rw-r--r--
📄
Transfer.php
15.58 KB
05/19/2025 10:07:14 AM
rw-r--r--
📁
UseArnRegion
-
05/19/2025 10:07:14 AM
rwxr-xr-x
📄
ValidateResponseChecksumParser.php
5.23 KB
05/19/2025 10:07:14 AM
rw-r--r--
Editing: SSECMiddleware.php
Close
<?php namespace Aws\S3; use Aws\CommandInterface; use Psr\Http\Message\RequestInterface; /** * Simplifies the SSE-C process by encoding and hashing the key. * @internal */ class SSECMiddleware { private $endpointScheme; private $nextHandler; /** * Provide the URI scheme of the client sending requests. * * @param string $endpointScheme URI scheme (http/https). * * @return callable */ public static function wrap($endpointScheme) { return function (callable $handler) use ($endpointScheme) { return new self($endpointScheme, $handler); }; } public function __construct($endpointScheme, callable $nextHandler) { $this->nextHandler = $nextHandler; $this->endpointScheme = $endpointScheme; } public function __invoke( CommandInterface $command, RequestInterface $request = null ) { // Allows only HTTPS connections when using SSE-C if (($command['SSECustomerKey'] || $command['CopySourceSSECustomerKey']) && $this->endpointScheme !== 'https' ) { throw new \RuntimeException('You must configure your S3 client to ' . 'use HTTPS in order to use the SSE-C features.'); } // Prepare the normal SSE-CPK headers if ($command['SSECustomerKey']) { $this->prepareSseParams($command); } // If it's a copy operation, prepare the SSE-CPK headers for the source. if ($command['CopySourceSSECustomerKey']) { $this->prepareSseParams($command, 'CopySource'); } $f = $this->nextHandler; return $f($command, $request); } private function prepareSseParams(CommandInterface $command, $prefix = '') { // Base64 encode the provided key $key = $command[$prefix . 'SSECustomerKey']; $command[$prefix . 'SSECustomerKey'] = base64_encode($key); // Base64 the provided MD5 or, generate an MD5 if not provided if ($md5 = $command[$prefix . 'SSECustomerKeyMD5']) { $command[$prefix . 'SSECustomerKeyMD5'] = base64_encode($md5); } else { $command[$prefix . 'SSECustomerKeyMD5'] = base64_encode(md5($key, true)); } } }