Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #399: Rectify invalid id in msr2019 #428

Merged
merged 3 commits into from
Apr 5, 2021

Conversation

Pushpit07
Copy link
Contributor

Added $ in is_cve helper

Earlier: r"CVE-\d+-\d+"
Now: r"CVE-\d+-\d+$"

This would avoid any invalid matches that were happening earlier

Merging updated codebase
Signed-off-by: Pushpit <pushpit07@gmail.com>
@@ -79,7 +79,7 @@ def create_etag(data_src, url, etag_key):
return True


is_cve = re.compile(r"CVE-\d+-\d+", re.IGNORECASE).match
is_cve = re.compile(r"CVE-\d+-\d+$", re.IGNORECASE).match
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMHO the regex CVE-\d{4}-\d{4,7} is more explicit and accurate. Let's use that instead.

Copy link
Collaborator

@sbs2001 sbs2001 left a comment

Choose a reason for hiding this comment

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

Thanks, see my comment inline

Signed-off-by: Pushpit <pushpit07@gmail.com>
@Pushpit07
Copy link
Contributor Author

Done

@sbs2001 sbs2001 merged commit 942e1ae into aboutcode-org:main Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants