Skip to content

Enhancement: Sanitize release names to require string #2724

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

Open
JacobCoffee opened this issue May 6, 2025 · 0 comments · May be fixed by #2725
Open

Enhancement: Sanitize release names to require string #2724

JacobCoffee opened this issue May 6, 2025 · 0 comments · May be fixed by #2725
Assignees
Labels
app/downloads Relates to the downloads app enhancement This is an improvement to existing code or configuration

Comments

@JacobCoffee
Copy link
Member

Is your feature request related to a problem? Please describe.

When creating a new release to test #2717, I thought the PR was bad because it was possible to create a release named just 3.20, causing the downloads/windows/ page to crash because it lacked a None check in the PR for release version.

Describe the solution you'd like

It'd be nice to just give a little error message in the admin form submission via:

def clean(self):
  super().clean()
  if not re.match(r'^Python\s[\d.]+$', self.name):
      raise ValidationError({
          'name': 'Name must be in the format "Python X.Y.Z" (e.g., "Python 3.9.0")'
      })

to get:
Image

Basic Example

No response

Describe alternatives you've considered

No response

Drawbacks and Impact

No response

Additional context

No response

@JacobCoffee JacobCoffee added enhancement This is an improvement to existing code or configuration app/downloads Relates to the downloads app labels May 6, 2025
@JacobCoffee JacobCoffee self-assigned this May 6, 2025
JacobCoffee added a commit that referenced this issue May 6, 2025
@JacobCoffee JacobCoffee linked a pull request May 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/downloads Relates to the downloads app enhancement This is an improvement to existing code or configuration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant