Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions schema/CVE_Record_Format.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@
"type": "string",
"description": "Name of the organization, project, community, individual, or user that created or maintains this product or hosted service. Can be 'N/A' if none of those apply. When collectionURL and packageName are used, this field may optionally represent the user or account within the package collection associated with the package.",
"minLength": 1,
"maxLength": 512
"maxLength": 512,
"pattern": "^(?!(n\/a)$).*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this regular expression isn't quite right (see here, it fails to match n/a). I believe it should be ^\s*[nN]\/[aA]\s*$ (see here, it matches all intended test cases).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, I was wrong. I forgot the regex needs to be negated.

Here is a corrected one: ^(?!(\s*[nN]\/[aA])\s*$).* (with explanation)

},
"product": {
"type": "string",
"description": "Name of the affected product.",
"minLength": 1,
"maxLength": 2048
"maxLength": 2048,
"pattern": "^(?!(n\/a)$).*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same regular expression comment as my other one.

},
"collectionURL": {
"description": "URL identifying a package collection (determines the meaning of packageName).",
Expand Down