Skip to content

Commit

Permalink
Merge pull request #103 from chen-keinan/fix/invalid-specification-ve…
Browse files Browse the repository at this point in the history
…rsion-1.5

fix: unmarshal bom on v1.5 return invalid specification version
  • Loading branch information
nscuro authored Jun 25, 2023
2 parents 72ea02c + ff719b6 commit 07e2f29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cyclonedx_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func (sv *SpecVersion) UnmarshalJSON(bytes []byte) error {
*sv = SpecVersion1_3
case SpecVersion1_4.String():
*sv = SpecVersion1_4
case SpecVersion1_5.String():
*sv = SpecVersion1_5
default:
return ErrInvalidSpecVersion
}
Expand Down
2 changes: 2 additions & 0 deletions cyclonedx_xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ func (sv *SpecVersion) UnmarshalXML(d *xml.Decoder, start xml.StartElement) erro
*sv = SpecVersion1_3
case SpecVersion1_4.String():
*sv = SpecVersion1_4
case SpecVersion1_5.String():
*sv = SpecVersion1_5
default:
return ErrInvalidSpecVersion
}
Expand Down

0 comments on commit 07e2f29

Please sign in to comment.