Skip to content

500 error when creating label with invalid color string #34618

Closed
@correctmost

Description

@correctmost

Description

I accidentally pasted a URL into the color field and triggered this bug.

Steps to reproduce:

  • Navigate to the labels page
  • Click "New Label"
  • Type "a" as the label name
  • Type "https:/" as the color value
  • Click "Save" to trigger a 500 error

Log output

.../repo/issue_label.go:121:NewLabel() [E] NewLabel: bad color code: https:/

Gitea Version

1.23.8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Arch Linux

How are you running Gitea?

gitea 1.23.8-1 from the Arch Linux package repository running via systemd

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions