1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Improve error message of missing tlp

* #34
This commit is contained in:
Fadi Abbud 2022-01-26 12:26:13 +01:00
parent c57de75dac
commit 54465b54ad

View file

@ -172,7 +172,7 @@ func (c *controller) upload(r *http.Request) (interface{}, error) {
// Extract real TLP from document.
if t == tlpCSAF {
if t = tlp(strings.ToLower(ex.tlpLabel)); !t.valid() || t == tlpCSAF {
return nil, fmt.Errorf("not a valid TL: %s", ex.tlpLabel)
return nil, fmt.Errorf("TLP label missing in the document")
}
}