mirror of https://github.com/MISP/MISP
Fixed a bug with downloadSample that returns all accessible samples instead of the requested one, fixes #610
- fixed incorrect branch order causing this issuepull/542/merge
parent
6ba92be513
commit
64485ad4a6
|
@ -2113,9 +2113,8 @@ class AttributesController extends AppController {
|
|||
|
||||
if ($hash) $validTypes = $this->Attribute->resolveHashType($hash);
|
||||
$types = array();
|
||||
if ($hash && $allSamples) {
|
||||
if ($hash) {
|
||||
debug($hash);
|
||||
if ($hash) {
|
||||
if ($allSamples) {
|
||||
if (empty($validTypes)) {
|
||||
$error = 'Invalid hash format (valid options are ' . implode(', ', array_keys($this->Attribute->hashTypes)) . ')';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue