Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added code to deal with bucket names that have a period in them with ssl
  • Loading branch information
Harry Pottash committed Jan 16, 2015
commit 78e7fa6645730c11782ec6ff113162fd1f67aca2
3 changes: 3 additions & 0 deletions S3.php
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,9 @@ private function __responseWriteCallback(&$curl, &$data)
private function __dnsBucketName($bucket)
{
if (strlen($bucket) > 63 || preg_match("/[^a-z0-9\.-]/", $bucket) > 0) return false;
if(S3::$useSSL){ //using SSL, certs aren't valid for subdomains in new libcurl3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might I recommend matching the style of the rest of this method?

if (S3::$useSSL && strstr($bucket, '.') !== false) return false;

if (strstr($bucket, '.') !== false) return false;
}
if (strstr($bucket, '-.') !== false) return false;
if (strstr($bucket, '..') !== false) return false;
if (!preg_match("/^[0-9a-z]/", $bucket)) return false;
Expand Down