apisix-dashboard: bug: route's description input more than 200 Chinese characters, no error message, but the route is useless
- Why do you submit this issue?
- Question or discussion
- Bug
- Requirements
- Feature or performance improvement
- Other
Route’s description can input more than 200 Chinese characters, no error, but the route is useless.
In fact:
the route’s useless, but the etcd will store the route data
$ curl http://127.0.0.1:9080/404.html
{"error_msg":"404 Route Not Found"}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
Hey guys. Something you don’t make it correct from the beginning: https://github.com/api7/jsonschema/blob/b9375642eb2da0f20486a38025e511a12687b5d4/lib/jsonschema.lua#L365 The Lua implementation doesn’t use
#
to get the length of data. Instead, it counts the string length instead of the string bytes.Yes. We have already done this.
Maybe there is something else causes the problem.
Here is my guess:
In Lua, the length of one Chinese character is
3
, because we use UT8 encode by default. The length is 1 in Golang land.