You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import error: issue creation: title is not fully printable
Here is the issue which causes that: golang/go#43562.
The JSON from the GraphQL API looks as follows:
"issue": {
"title": "src/net/http/header when header have\u0002 ",
"body": "<!--\r\nPlease answer these questions before submitting your issue. Thanks!\r\nFor questions please use one of our forums: https://github.com/golang/go/wiki/Questions\r\n-->\r\n\r\n### What version of Go are you using (`go version`)?\r\n\r\n<pre>\r\n$ go version\r\ngo version go1.15.2 linux/amd64\r\n</pre>\r\n\r\nwhen i post header like (202012300001\u0002sometext\u0002timestampvalue) to go http server \r\ni got error 400 bad request invalid header value \r\n\r\n\r\n"
}
So what's happening is that the core of git-bug is checking that there is no funny characters in the bugs (here it's a control character). This is checked with the function text.Safe().
There is the counterpart function text.Cleanup() that should be used on every imported text by the bridges. In the github bridge, this is done for the content of the issue, but not the title.
Activity
MichaelMure commentedon Apr 10, 2021
So what's happening is that the core of git-bug is checking that there is no funny characters in the bugs (here it's a control character). This is checked with the function
text.Safe().There is the counterpart function
text.Cleanup()that should be used on every imported text by the bridges. In the github bridge, this is done for the content of the issue, but not the title.MichaelMure commentedon Apr 15, 2021
On that topic, I found that
text.Cleanup()can't return an error with how the current code is written, so this could be made way cleaner.make sure every text input is safe and validated