Title: [bug] PUT "key<>":[] 居然转成了 key = '[]' · Issue #276 · APIJSON/APIJSON · GitHub
Open Graph Title: [bug] PUT "key<>":[] 居然转成了 key = '[]' · Issue #276 · APIJSON/APIJSON
X Title: [bug] PUT "key<>":[] 居然转成了 key = '[]' · Issue #276 · APIJSON/APIJSON
Description: 应该当成条件来处理 或者 直接返回错误信息。 环境信息 系统: Linux CentOS JDK: 1.8.0_17 数据库: MySQL 5.7.14 APIJSON: 4.7.0 问题描述 http://apijson.cn:8080/put { "Moment": { "id": 15, "praiseUserIdList<>": [ 1 ] }, "tag": "Moment", "@Explain": true } 错误信息 无 目前可以通过加 @combin...
Open Graph Description: 应该当成条件来处理 或者 直接返回错误信息。 环境信息 系统: Linux CentOS JDK: 1.8.0_17 数据库: MySQL 5.7.14 APIJSON: 4.7.0 问题描述 http://apijson.cn:8080/put { "Moment": { "id": 15, "praiseUserIdList<>": [ 1 ] }, "tag": "Moment", "...
X Description: 应该当成条件来处理 或者 直接返回错误信息。 环境信息 系统: Linux CentOS JDK: 1.8.0_17 数据库: MySQL 5.7.14 APIJSON: 4.7.0 问题描述 http://apijson.cn:8080/put { "Moment": { "id": 15, "praiseUserIdList<>...
Opengraph URL: https://github.com/APIJSON/APIJSON/issues/276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[bug] PUT \"key\u003c>\":[] 居然转成了 key = '[]'","articleBody":"应该当成条件来处理 或者 直接返回错误信息。\r\n\r\n\r\n**环境信息**\r\n - 系统: Linux CentOS\r\n - JDK: 1.8.0_17\r\n - 数据库: MySQL 5.7.14\r\n - APIJSON: 4.7.0\r\n\r\n**问题描述**\r\n\r\n\r\n\r\nhttp://apijson.cn:8080/put\r\n{\r\n \"Moment\": {\r\n \"id\": 15,\r\n \"praiseUserIdList\u003c>\": [\r\n 1\r\n ]\r\n },\r\n \"tag\": \"Moment\",\r\n \"@explain\": true\r\n}\r\n\r\n**错误信息**\r\n\r\n无\r\n\r\n\r\n目前可以通过加 @combine 来解决。\r\n\r\n{\r\n \"Moment\": {\r\n \"id\": 15,\r\n \"content\": \"test\",\r\n \"praiseUserIdList\u003c>\": [\r\n 82002\r\n ],\r\n \"@combine\": \"praiseUserIdList\u003c>\"\r\n },\r\n \"tag\": \"Moment\",\r\n \"@explain\": true\r\n}\r\n\r\n但最好还是在 AbstractObjectParser 中对 key 判断是否为不包含任何符合的 字段名。\r\n\r\n\r\n```java\r\nelse if (method == PUT && value instanceof JSONArray && (whereList == null || whereList.contains(key) == false))\r\n```\r\n 改为\r\n```java\r\nelse if (method == PUT && value instanceof JSONArray && (whereList == null || whereList.contains(key) == false) && StringUtil.isName(key))\r\n```\r\n\r\nhttps://github.com/Tencent/APIJSON/blob/0e06d1989a7a23de7115df5c9ab0a8166dd720ee/APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java\r\n\r\n类似问题: \"userId>\": 82002 转为了 userId = 82002\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n不能这么简单地判断 isWhere,而是在循环内判断 method != PUT || (StringUtil.isName(key) == false)\r\n\r\nhttps://github.com/Tencent/APIJSON/blob/0e06d1989a7a23de7115df5c9ab0a8166dd720ee/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java\r\n","author":{"url":"https://github.com/TommyLemon","@type":"Person","name":"TommyLemon"},"datePublished":"2021-07-30T03:39:00Z","url":"https://github.com/APIJSON/APIJSON/issues/276"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0969edce-375e-8d7d-f3fc-e50a054a58eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D166:3DC20:39B74:4F4BC:6AFCFC7D |
| html-safe-nonce | f6bab81cdea3afb49a00db480ae5288946fc8164d0a3d37ce53c4c134dde9015 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTY2OjNEQzIwOjM5Qjc0OjRGNEJDOjZBRkNGQzdEIiwidmlzaXRvcl9pZCI6IjcwMzU3MDk4NTYzNTg5MjMzODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 24de7762e7529aeabf6c018f0b8cb31defae835addd70245a27cc5ce4c327994 |
| hovercard-subject-tag | issue:956371398 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/APIJSON/APIJSON/276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a81993e41e02f20cfc6dbc11fcddc53f2209405bad9c5f14f01cad37c90de956/APIJSON/APIJSON/issues/276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a81993e41e02f20cfc6dbc11fcddc53f2209405bad9c5f14f01cad37c90de956/APIJSON/APIJSON/issues/276 |
| og:image:alt | 应该当成条件来处理 或者 直接返回错误信息。 环境信息 系统: Linux CentOS JDK: 1.8.0_17 数据库: MySQL 5.7.14 APIJSON: 4.7.0 问题描述 http://apijson.cn:8080/put { "Moment": { "id": 15, "praiseUserIdList<>": [ 1 ] }, "tag": "Moment", "... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TommyLemon |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfabad6ee26d2b84c7afef4ae0cc71b8b692fb9d66f9f15997652ef991bfd3f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/APIJSON/APIJSON git https://github.com/APIJSON/APIJSON.git |
| octolytics-dimension-user_id | 41146037 |
| octolytics-dimension-user_login | APIJSON |
| octolytics-dimension-repository_id | 74359442 |
| octolytics-dimension-repository_nwo | APIJSON/APIJSON |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 74359442 |
| octolytics-dimension-repository_network_root_nwo | APIJSON/APIJSON |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 35f85b78676038389558a41adf8d76e474592ede |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width