Title: "IndexError: index out of range" in _reject_surrounding_whitespace · Issue #1257 · python-hyper/h2 · GitHub
Open Graph Title: "IndexError: index out of range" in _reject_surrounding_whitespace · Issue #1257 · python-hyper/h2
X Title: "IndexError: index out of range" in _reject_surrounding_whitespace · Issue #1257 · python-hyper/h2
Description: Hello, I am working on integrating fuzzer to project h2. My goal is to include it in the oss-fuzz project. I believe that this can be a valuable contribution to the library, the importance of which is becoming more and more higher, among...
Open Graph Description: Hello, I am working on integrating fuzzer to project h2. My goal is to include it in the oss-fuzz project. I believe that this can be a valuable contribution to the library, the importance of which...
X Description: Hello, I am working on integrating fuzzer to project h2. My goal is to include it in the oss-fuzz project. I believe that this can be a valuable contribution to the library, the importance of which...
Opengraph URL: https://github.com/python-hyper/h2/issues/1257
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"IndexError: index out of range\" in _reject_surrounding_whitespace","articleBody":"Hello,\r\n\r\nI am working on integrating fuzzer to project `h2`. My goal is to include it in the `oss-fuzz` project. I believe that this can be a valuable contribution to the library, the importance of which is becoming more and more higher, among others due to the use by `httpx` - the library which popularity also growing. \r\n\r\nI identified the first problems and I would like to know if such problems are interesting for your project and your are interested to handle them.\r\n\r\n```python\r\nimport h2.connection\r\nimport h2.config\r\nfrom h2.exceptions import ProtocolError\r\n\r\npayload = b'\\x00\\x00\\x08\\x01\\x05\\xef\\x00\\x00@\\x00\\x00\\x05\\x00\\x00\\x00\\x00\\x04\\x8c\\x00'\r\nconfig = h2.config.H2Configuration()\r\nconn = h2.connection.H2Connection(config=config)\r\ntry:\r\n conn.receive_data(payload)\r\n conn.data_to_send()\r\nexcept ProtocolError:\r\n pass\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/tmp/h2-fuzz/test2.py\", line 9, in \u003cmodule>\r\n conn.receive_data(payload)\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/connection.py\", line 1463, in receive_data\r\n events.extend(self._receive_frame(frame))\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/connection.py\", line 1486, in _receive_frame\r\n frames, events = self._frame_dispatch_table[frame.__class__](frame)\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/connection.py\", line 1560, in _receive_headers_frame\r\n frames, stream_events = stream.receive_headers(\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/stream.py\", line 1057, in receive_headers\r\n events[0].headers = self._process_received_headers(\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/stream.py\", line 1300, in _process_received_headers\r\n return list(headers)\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/utilities.py\", line 492, in inner\r\n for header in headers:\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/utilities.py\", line 437, in _validate_host_authority_header\r\n for header in headers:\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/utilities.py\", line 331, in _reject_pseudo_header_fields\r\n for header in headers:\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/utilities.py\", line 287, in _reject_connection_header\r\n for header in headers:\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/utilities.py\", line 271, in _reject_te\r\n for header in headers:\r\n File \"/tmp/tmp.mokMU0wrkK/lib/python3.9/site-packages/h2/utilities.py\", line 255, in _reject_surrounding_whitespace\r\n if header[0][0] in _WHITESPACE or header[0][-1] in _WHITESPACE:\r\nIndexError: index out of range\r\n```\r\n\r\n","author":{"url":"https://github.com/ad-m","@type":"Person","name":"ad-m"},"datePublished":"2021-09-02T19:59:04Z","url":"https://github.com/python-hyper/h2/issues/1257"}
| 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:3bed405c-1b56-896a-fb00-849fe3d094aa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E526:3373A3:3852D1B:4B4106E:6B06EFA2 |
| html-safe-nonce | 6dbdf3d8b012b0d51fc01d840eab5e863c27af6a4932a1d5750efd83ba1ff85e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTI2OjMzNzNBMzozODUyRDFCOjRCNDEwNkU6NkIwNkVGQTIiLCJ2aXNpdG9yX2lkIjoiMjk5MDM2MTIzNjM1NDgyMjA1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 59038004abe53fda0d6e6802e6c3bfcd9b3d6060e96ff00283b4341ed8d06f0a |
| hovercard-subject-tag | issue:987109405 |
| 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/python-hyper/h2/1257/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c98e0db66ba39a64fd72441a990ef444a6f00fbf92ca8ec656691787b1a2c5f0/python-hyper/h2/issues/1257 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c98e0db66ba39a64fd72441a990ef444a6f00fbf92ca8ec656691787b1a2c5f0/python-hyper/h2/issues/1257 |
| og:image:alt | Hello, I am working on integrating fuzzer to project h2. My goal is to include it in the oss-fuzz project. I believe that this can be a valuable contribution to the library, the importance of which... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ad-m |
| hostname | github.com |
| expected-hostname | github.com |
| None | 351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/h2 git https://github.com/python-hyper/h2.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 37996233 |
| octolytics-dimension-repository_nwo | python-hyper/h2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 37996233 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/h2 |
| 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 | 891bde3f438884e9c6c7ccd826f33805910a978b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width