-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] Due date format issue #5226
Comments
On which page do you currently experience this issue? |
It is on issue page |
We already have multiple issues regarding this, should we use some library to handle date formatting? |
But I saw the response of "https://try.gitea.io/api/v1/repos/{userName}/{repoName}/issues/1/deadline" in the chrome console is 401 And the request payload is {due_date: "2017-02-17T00:00:00.000Z"} This issue seems not caused by error formating |
@kanocz anything in the logs? |
@kanocz What was the response? Also, if you have problems running Gitea locally, feel free to ask in our Discord server or the forum. |
[Macaron] 2018-10-31 21:10:17: Completed POST /api/v1/repos/Kee1234/gggg/issues/1/deadline 401 Unauthorized in 8.82763msI got this on my local environment. The response was 401. Since the client ajax call got the 401 error, the js function setDeadline() handle the error in the same way. So it shows the "The due date is invalid or out of range. Please use the format 'yyyy-mm-dd' " on the page. |
This also happens in the Swagger dashboard for the same request. |
Looks like this was broken by #4840 (among other things) |
@kolaente Yes, I trace the code and make some experiments. I found that ctx.Data["IsApiToken"] = true does not be executed while checking user is signed. So func reqToken() macaron.Handler {
return func(ctx *context.Context) {
for key := range ctx.Data{
fmt.Printf("Key: %s |Value: %v\n", key, ctx.Data[key])
}
if true != ctx.Data["IsApiToken"] {
ctx.Error(401)
return
}
}
} always gets 401 error. #5249 shows the solution to fix this bug |
I've opened #5249 to fix this and other issues. |
why this issue is closed? Problem still here: |
It looks like it returns an error 500, so maybe some other thing is broken and the error message is just not good... |
@nikitasius could you confirm that #5250 didn't resolve the issue? |
Hi, it was on your official demo. If you don't see on your official demo same error - guess it's fixed. Just check. |
Gitea version (or commit ref): 5fc0a12
Can you reproduce the bug at https://try.gitea.io:
I guess the following image would explain the issue better.
The text was updated successfully, but these errors were encountered: