mirror of https://github.com/MISP/MISP
Merge pull request #6699 from folbricht-stripe/s3-fix-writable-check
fix: Don't fail writable attachment dir test for S3pull/6707/head
commit
a290629fe0
|
@ -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 = '';
|
||||
|
|
|
@ -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.';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue