Title: null, true, and false parsing accepts bad input · Issue #357 · json-iterator/java · GitHub
Open Graph Title: null, true, and false parsing accepts bad input · Issue #357 · json-iterator/java
X Title: null, true, and false parsing accepts bad input · Issue #357 · json-iterator/java
Description: Various places in this library that parse null will see 'n' and then skip the next three characters without validating that the next three characters are 'u' 'l' 'l'. So this is parsed as null: nope. See for example https://github.com/js...
Open Graph Description: Various places in this library that parse null will see 'n' and then skip the next three characters without validating that the next three characters are 'u' 'l' 'l'. So this is parsed as null: nop...
X Description: Various places in this library that parse null will see 'n' and then skip the next three characters without validating that the next three characters are 'u' 'l' 'l'...
Opengraph URL: https://github.com/json-iterator/java/issues/357
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"null, true, and false parsing accepts bad input","articleBody":"Various places in this library that parse null will see 'n' and then skip the next three characters without validating that the next three characters are 'u' 'l' 'l'. So this is parsed as null: `nope`.\r\n\r\nSee for example https://github.com/json-iterator/java/blob/master/src/main/java/com/jsoniter/IterImplObject.java#L10-L12\r\n\r\n```\r\n public static final String readObject(JsonIterator iter) throws IOException {\r\n byte c = IterImpl.nextToken(iter);\r\n switch (c) {\r\n case 'n':\r\n IterImpl.skipFixedBytes(iter, 3);\r\n return null;\r\n```\r\n\r\nEdit: also note that this same issue is present for `true` and `false`.","author":{"url":"https://github.com/mtdowling","@type":"Person","name":"mtdowling"},"datePublished":"2024-06-27T18:05:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/357/java/issues/357"}
| 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:902443e2-df3a-1ce0-a2c0-7ab20ea0cfa2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DD2:39C817:AED8A1:F416DE:696A3263 |
| html-safe-nonce | 111900aab890eacbb69506e966412f8c8415f7b267ff48c2cea9d05cd281dfa9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REQyOjM5QzgxNzpBRUQ4QTE6RjQxNkRFOjY5NkEzMjYzIiwidmlzaXRvcl9pZCI6IjE2OTM1NDY3NDM3NzgxMjg0ODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0e9533565042dc2542bd8502f93e38444480d251519b972614edafbfed22d9f1 |
| hovercard-subject-tag | issue:2378780272 |
| 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/json-iterator/java/357/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ecc420377ab672f7dd02d273a1519282ca96ccb3184d688dd710f8d05d5b254a/json-iterator/java/issues/357 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ecc420377ab672f7dd02d273a1519282ca96ccb3184d688dd710f8d05d5b254a/json-iterator/java/issues/357 |
| og:image:alt | Various places in this library that parse null will see 'n' and then skip the next three characters without validating that the next three characters are 'u' 'l' 'l'. So this is parsed as null: nop... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mtdowling |
| hostname | github.com |
| expected-hostname | github.com |
| None | ade130928b3890d20ecf9c887468a17e88d5c9a740ea2a85c2c2162e7c58e623 |
| turbo-cache-control | no-preview |
| go-import | github.com/json-iterator/java git https://github.com/json-iterator/java.git |
| octolytics-dimension-user_id | 24260074 |
| octolytics-dimension-user_login | json-iterator |
| octolytics-dimension-repository_id | 75621695 |
| octolytics-dimension-repository_nwo | json-iterator/java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 75621695 |
| octolytics-dimension-repository_network_root_nwo | json-iterator/java |
| 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 | c00842167ca2e5b13e8171812965d503e925ece6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width