Skip to content

Commit

Permalink
FIX Add SS-2023-001 style security commits.
Browse files Browse the repository at this point in the history
Noticed this in passing while reviewing another change
  • Loading branch information
GuySartorelli committed Sep 18, 2023
1 parent cc33e6d commit 0133d99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Model/Changelog/ChangelogItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,14 @@ public function getShortHash()
*/
public function getSecurityCVE()
{
// New CVE style identifiers
if (preg_match('/^\[(?<cve>CVE-(\d){4}-(\d){4,})\]/i', $this->getRawMessage(), $matches)) {
// New CVE style identifiers (e.g. CVE-2023-32302)
if (preg_match('/^\[(?<cve>(CVE-(\d){4}-(\d){4,}))\]/i', $this->getRawMessage(), $matches)) {
return strtolower($matches['cve']);
}
// Non-CVE style identifiers (e.g. SS-2023-001)
if (preg_match('/^\[(?<ss>(SS-(\d){4}-(\d){3}))\]/i', $this->getRawMessage(), $matches)) {
return strtolower($matches['ss']);
}
}

/**
Expand Down

0 comments on commit 0133d99

Please sign in to comment.