chg: [stix2 export] Using a specific filter to specify the STIX version

- `version` being too generic and used from another
  end point, we use `stix-version` in order to
  avoid confusion between the 2 filters
pull/7818/head
chrisr3d 2021-10-08 17:17:46 +02:00
parent 91e7d54856
commit 71837d2f1b
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -28,8 +28,8 @@ class StixExport
public function setDefaultFilters($filters)
{
$sane_version = (!empty($filters['version']) && in_array($filters['version'], $this->__sane_versions));
$this->__version = $sane_version ? $filters['version'] : $this->__default_version;
$sane_version = (!empty($filters['stix-version']) && in_array($filters['stix-version'], $this->__sane_versions));
$this->__version = $sane_version ? $filters['stix-version'] : $this->__default_version;
}
public function handler($data, $options = array())