Issue 'due date' format checking / 500 ISE #1767

Closed
opened 2025-11-02 04:12:41 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @bugreport0 on GitHub (May 8, 2018).

  • Gitea version (or commit ref): 1.1.0+1205-gbb801488
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The issue due date entry box is finicky:

  • entering '1234' gives a HTTP 500 error page instead of an 'invalid format' warning
  • entering '1234-01-01' makes parts of Gitea think a due date was entered, but others ignore it

Screenshots

due-date-500

due-date-unset

Originally created by @bugreport0 on GitHub (May 8, 2018). - Gitea version (or commit ref): 1.1.0+1205-gbb801488 - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description The issue due date entry box is finicky: - entering '1234' gives a HTTP 500 error page instead of an 'invalid format' warning - entering '1234-01-01' makes parts of Gitea think a due date was entered, but others ignore it ## Screenshots ![due-date-500](https://user-images.githubusercontent.com/32939607/39752486-22d483ac-52ab-11e8-839c-f1942757cf4c.png) ![due-date-unset](https://user-images.githubusercontent.com/32939607/39752492-2697640a-52ab-11e8-9d82-e8eb61a1acd8.png)
GiteaMirror added the type/bug label 2025-11-02 04:12:41 -06:00
Author
Owner

@daviian commented on GitHub (May 8, 2018):

@bugreport0 It ought to be a date input field. ;-) But you're right, the input format should be checked.
It's also possible to input a date before 1970, despite an "modified date" - action is generated the due date don't get set.

@daviian commented on GitHub (May 8, 2018): @bugreport0 It ought to be a date input field. ;-) But you're right, the input format should be checked. It's also possible to input a date before 1970, despite an "modified date" - action is generated the due date don't get set.
Author
Owner

@kolaente commented on GitHub (May 9, 2018):

The error 500 is because the validation happens server side, therefore the functions returns an err which leads to having 500 returned.
Validation is currently done directly by Macaron,so I don't know if we could return a message telling the user what went wrong instead 🤔

@kolaente commented on GitHub (May 9, 2018): The error 500 is because the validation happens server side, therefore the functions returns an err which leads to having 500 returned. Validation is currently done directly by Macaron,so I don't know if we could return a message telling the user what went wrong instead :thinking:
Author
Owner

@daviian commented on GitHub (May 9, 2018):

@kolaente But a 500 suggest an internal server error and not a validation error (4xx status code)

@daviian commented on GitHub (May 9, 2018): @kolaente But a 500 suggest an internal server error and not a validation error (4xx status code)
Author
Owner

@kolaente commented on GitHub (May 9, 2018):

I've submitted a pr for issue due dates prior to 1970 not being displayed on the issue page: #3930
The validation error will be resolved with #3890. The api returns proper errorcodes, after that it's just a small thing to display a message to the user.

@kolaente commented on GitHub (May 9, 2018): I've submitted a pr for issue due dates prior to 1970 not being displayed on the issue page: #3930 The validation error will be resolved with #3890. The api returns proper errorcodes, after that it's just a small thing to display a message to the user.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1767