Merge pull request #6699 from folbricht-stripe/s3-fix-writable-check

fix: Don't fail writable attachment dir test for S3
pull/6707/head
Jakub Onderka 2020-12-07 12:07:03 +01:00 committed by GitHub
commit a290629fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -73,7 +73,8 @@ class CryptGpgExtended extends Crypt_GPG
}
/**
* Return key info without importing it.
* Return key info without importing it when GPG supports --import-options show-only, otherwise just import and
* then return details.
*
* @param string $key
* @return Crypt_GPG_Key[]
@ -82,6 +83,18 @@ class CryptGpgExtended extends Crypt_GPG
*/
public function keyInfo($key)
{
$version = $this->engine->getVersion();
if (version_compare($version, '2.1.23', 'le')) {
$importResult = $this->importKey($key);
$keys = [];
foreach ($importResult['fingerprints'] as $fingerprint) {
foreach ($this->getKeys($fingerprint) as $key) {
$keys[] = $key;
}
}
return $keys;
}
$input = $this->_prepareInput($key, false, false);
$output = '';

View File

@ -3834,6 +3834,9 @@ class Server extends AppModel
if (substr($value, 0, 7) === "phar://") {
return 'Phar protocol not allowed.';
}
if (substr($value, 0, 5) === "s3://") {
return true;
}
if (!is_dir($value)) {
return 'Not a valid directory.';
}