Title: Wrong replacing of '+' · Issue #28 · Code-Sharp/uHttpSharp · GitHub
Open Graph Title: Wrong replacing of '+' · Issue #28 · Code-Sharp/uHttpSharp
X Title: Wrong replacing of '+' · Issue #28 · Code-Sharp/uHttpSharp
Description: When parsing the query, the replacement operation of the '+' character should be performed before URI decoding. BASE64 encoded string in the query can contain '+' character which is currently replaced, so the BASE64 value is corrupted. p...
Open Graph Description: When parsing the query, the replacement operation of the '+' character should be performed before URI decoding. BASE64 encoded string in the query can contain '+' character which is currently repla...
X Description: When parsing the query, the replacement operation of the '+' character should be performed before URI decoding. BASE64 encoded string in the query can contain '+' character which is...
Opengraph URL: https://github.com/Code-Sharp/uHttpSharp/issues/28
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong replacing of '+'","articleBody":"When parsing the query, the replacement operation of the '+' character should be performed before URI decoding. BASE64 encoded string in the query can contain '+' character which is currently replaced, so the BASE64 value is corrupted.\r\n\r\n public QueryStringHttpHeaders(string query)\r\n {\r\n var splittedKeyValues = query.Split(Seperators, StringSplitOptions.RemoveEmptyEntries);\r\n var values = new Dictionary\u003cstring, string\u003e(splittedKeyValues.Length / 2, StringComparer.InvariantCultureIgnoreCase);\r\n\r\n for (int i = 0; i \u003c splittedKeyValues.Length; i += 2)\r\n {\r\n var key = Uri.UnescapeDataString(splittedKeyValues[i]);\r\n string value = null;\r\n if (splittedKeyValues.Length \u003e i + 1)\r\n {\r\n value = Uri.UnescapeDataString(splittedKeyValues[i + 1]).Replace('+', ' '); \r\n }\r\n values[key] = value;\r\n }\r\n _count = values.Count;\r\n _child = new HttpHeaders(values);\r\n }\r\n\r\nThe replacing should be modified as follows:\r\n` value = Uri.UnescapeDataString(splittedKeyValues[i + 1].Replace('+', ' '));`\r\n\r\nAdditionally using the `StringSplitOptions.RemoveEmptyEntries` option can cause errors in the case the value is empty. I think it should be replaced by `StringSplitOptions.None`.","author":{"url":"https://github.com/czesiu20","@type":"Person","name":"czesiu20"},"datePublished":"2019-04-16T11:38:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/28/uHttpSharp/issues/28"}
| 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:25ac4e9f-5848-9608-2c49-bad5794e7d66 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E39A:340321:7DBB893:A1F3945:6975C7F5 |
| html-safe-nonce | 0e0f6244c1953af618bfe92a2f0ea9b4cbbcb5228a5ba455d8d5a933c41df834 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzlBOjM0MDMyMTo3REJCODkzOkExRjM5NDU6Njk3NUM3RjUiLCJ2aXNpdG9yX2lkIjoiNDQ0MzY3ODkwNDAxMDc4NjgwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d4e23780a531c062fdb80e0b455c7e4eeec9d48f7468c96b35fe822b10dc443f |
| hovercard-subject-tag | issue:433732406 |
| 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/Code-Sharp/uHttpSharp/28/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f3fff27747bda38d395ed4c754a82efaa618cd7842e0f078e435dc367c5d088a/Code-Sharp/uHttpSharp/issues/28 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f3fff27747bda38d395ed4c754a82efaa618cd7842e0f078e435dc367c5d088a/Code-Sharp/uHttpSharp/issues/28 |
| og:image:alt | When parsing the query, the replacement operation of the '+' character should be performed before URI decoding. BASE64 encoded string in the query can contain '+' character which is currently repla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | czesiu20 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/Code-Sharp/uHttpSharp git https://github.com/Code-Sharp/uHttpSharp.git |
| octolytics-dimension-user_id | 7625607 |
| octolytics-dimension-user_login | Code-Sharp |
| octolytics-dimension-repository_id | 15547297 |
| octolytics-dimension-repository_nwo | Code-Sharp/uHttpSharp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 2642421 |
| octolytics-dimension-repository_parent_nwo | bonesoul/uhttpsharp |
| octolytics-dimension-repository_network_root_id | 2642421 |
| octolytics-dimension-repository_network_root_nwo | bonesoul/uhttpsharp |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width