Skip to content

PUT on /notifications endpoint with invalid date causes internal server error #15346

Closed
@matusf

Description

@matusf
  • Gitea version (or commit ref): Gitea version 1.13.7 built with GNU Make 4.1, go1.15.11 : bindata, sqlite, sqlite_unlock_notify
  • Git version: git version 2.17.
  • Operating system: Ubuntu 18.04
  • Downloaded gitea from downloads page
  • Running as a command-line program
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
2021/04/08 18:14:24 Completed PUT /api/v1/notifications?last_read_at=xxx 500 Internal Server Error in 35.807758ms

Description

Make PUT request on /notifications endpoint with supplied authorization token and invalid date in query parameters. Then 500 response is returned with following response body:

curl -X PUT 'http://localhost:3000/api/v1/notifications?last_read_at=xxx' -H "Authorization: token $TOKEN"
{"message":"","url":"http://localhost:3000/api/swagger"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions