Skip to content

Show the CVE field only when the Security section is selected - #474

Merged
Mariatta merged 2 commits into
python:mainfrom
Mariatta:cve-field-security-only
Oct 22, 2026
Merged

Mariatta merged 2 commits into
python:mainfrom
Mariatta:cve-field-security-only

Conversation

@Mariatta

@Mariatta Mariatta commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

The CVE identifier only applies to Security entries, and the server already rejects a CVE given with any other section (#470). The form, however, always showed the field, which invited people to fill it in for other sections and then hit the error on submit.

This hides the CVE field until "Security" is chosen in the section dropdown, and clears any typed value when the selection moves to another section, so a stale value is never submitted. The toggle also runs on page load, so the field is correct when the browser restores a previous selection.

The help text no longer needs to say "for a Security entry only", since the field now only appears in that case. The server-side check is unchanged.

The readme and the howto page now describe the field, since neither mentioned it before.

Demo

Choosing the Security section shows the CVE field; choosing another section hides it

Full-resolution recording:

Screen.Recording.2026-10-21.at.12.54.04.PM.mov

The CVE identifier only applies to Security entries, and the server
rejects it for any other section. Hide the field until Security is
chosen in the section dropdown, and clear it when the selection moves
away so a stale value is never submitted.
@Mariatta
Mariatta force-pushed the cve-field-security-only branch from edeff2d to 125a0a9 Compare October 21, 2026 20:16
Neither mentioned the field. Say that it appears for Security entries,
the form it takes, and that it is stored as .. cve: metadata in the
news file.
@Mariatta
Mariatta force-pushed the cve-field-security-only branch from 09113de to 1e7cd10 Compare October 21, 2026 20:26
@Mariatta
Mariatta merged commit 47e21b0 into python:main Oct 22, 2026
7 checks passed
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.

1 participant