Title: Max length in strip_string() should by bytes not characters. · Issue #1691 · getsentry/sentry-python · GitHub
Open Graph Title: Max length in strip_string() should by bytes not characters. · Issue #1691 · getsentry/sentry-python
X Title: Max length in strip_string() should by bytes not characters. · Issue #1691 · getsentry/sentry-python
Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce If you use this function: https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L834-L854 If you use a value that contains unicode char...
Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce If you use this function: https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L834-L854 If yo...
X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce If you use this function: https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L834-L854 If yo...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/1691
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Max length in strip_string() should by bytes not characters.","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n1.9.10\n\n### Steps to Reproduce\n\nIf you use this function:\r\nhttps://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L834-L854\r\n\r\nIf you use a value that contains unicode characters like this one:\r\n`Randolph Carter est obsédé par la redécouverte de la ville du coucher, la ville de ses rêves.`\r\n\r\n\n\n### Expected Result\n\nThe truncation and indexes in the AnnotatedValue should be done by number of bytes and not number of characters.\n\n### Actual Result\n\nThe index range in the resulting AnnotatedValue is wrong, because it is the len() in characters and not the len in bytes. \r\n\r\nTo use the byte length one has to use something like this:\r\n\r\n```\r\nlength = len(value.encode(\"utf-8\"))\r\n```\r\n","author":{"url":"https://github.com/antonpirker","@type":"Person","name":"antonpirker"},"datePublished":"2022-10-19T11:44:14Z","url":"https://github.com/getsentry/sentry-python/issues/1691"}
| 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:ebe8b4c9-0ad3-f126-d76e-95c8ad0a7766 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3E6:24ACB9:2F766D:3FBD41:6B00C379 |
| html-safe-nonce | a7a90690854d79ffd9466f2972df41861decf25d31bde1d40f478cfaaee8ae42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0U2OjI0QUNCOToyRjc2NkQ6M0ZCRDQxOjZCMDBDMzc5IiwidmlzaXRvcl9pZCI6Ijc2NzAxMzIwMjk4NDA3MzcxNDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 97ecb84a0ef96ad506bf300887d2efd5c645033ff6b9bea4d81dab526f9bf0ec |
| hovercard-subject-tag | issue:1414818487 |
| 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/getsentry/sentry-python/1691/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6eb5191ab657580e150f7b8cc84596f8d122ab8faed6e69c58dcee052d2e767b/getsentry/sentry-python/issues/1691 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6eb5191ab657580e150f7b8cc84596f8d122ab8faed6e69c58dcee052d2e767b/getsentry/sentry-python/issues/1691 |
| og:image:alt | How do you use Sentry? Sentry Saas (sentry.io) Version 1.9.10 Steps to Reproduce If you use this function: https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L834-L854 If yo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | antonpirker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| 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 | 1fee81a280ea86312b69448e261b418189bfd5b5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width