Title: Base64 Decode requires padding · Issue #37 · colinta/SublimeStringEncode · GitHub
Open Graph Title: Base64 Decode requires padding · Issue #37 · colinta/SublimeStringEncode
X Title: Base64 Decode requires padding · Issue #37 · colinta/SublimeStringEncode
Description: Base64 Decode will not decode strings with the padding characters removed. As the padding characters are technically not required to decode without ambiguity, many applications strip the padding after encoding. A quick fix would be to ch...
Open Graph Description: Base64 Decode will not decode strings with the padding characters removed. As the padding characters are technically not required to decode without ambiguity, many applications strip the padding af...
X Description: Base64 Decode will not decode strings with the padding characters removed. As the padding characters are technically not required to decode without ambiguity, many applications strip the padding af...
Opengraph URL: https://github.com/colinta/SublimeStringEncode/issues/37
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Base64 Decode requires padding","articleBody":"Base64 Decode will not decode strings with the padding characters removed. \r\n\r\nAs the padding characters are technically not required to decode without ambiguity, many applications strip the padding after encoding. \r\n\r\nA quick fix would be to change the following line ([here](https://github.com/colinta/SublimeStringEncode/blob/6d07eb74d4861979e5f05f60138302145b1bf379/string_encode.py#L273)): \r\n\r\n```\r\nreturn base64.b64decode(text).decode('raw_unicode_escape')\r\n```\r\n\r\nto this: \r\n\r\n```\r\nreturn base64.b64decode(text + '===').decode('raw_unicode_escape')\r\n```\r\n\r\n(Per [this gist](https://gist.github.com/perrygeo/ee7c65bb1541ff6ac770), excess padding is safely ignored. More tips and tricks in that link).\r\n\r\nA Sublime user can work around this by manually typing in the padding before using this feature, but I think adding this redundancy could benefit the overall ease of use (and hopefully not [break anyone's workflow](https://xkcd.com/1172/)). ","author":{"url":"https://github.com/scholtes","@type":"Person","name":"scholtes"},"datePublished":"2018-05-17T21:37:14Z","url":"https://github.com/colinta/SublimeStringEncode/issues/37"}
| 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:105fc8bf-6958-df6c-4ef7-a852c0bfd0ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8732:29C55F:1F90D76:2A9CB90:6AFBA4F9 |
| html-safe-nonce | 42c8dd0e5fd39f41cdb7e1c3083e35a810fe823414aa0bd71c5112f4c9211fa9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzMyOjI5QzU1RjoxRjkwRDc2OjJBOUNCOTA6NkFGQkE0RjkiLCJ2aXNpdG9yX2lkIjoiMTM3NDcxOTQ0MTU0MjgxNzAxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b44d96b820206a2d9cdb0fdf522ec0a7e6a2241d21ee98e54e6d7806e17a9129 |
| hovercard-subject-tag | issue:324194976 |
| 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/colinta/SublimeStringEncode/37/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3445684c531c90aa8e6f94235a64a869a1783291912a2b1dfe1d5c4e10588194/colinta/SublimeStringEncode/issues/37 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3445684c531c90aa8e6f94235a64a869a1783291912a2b1dfe1d5c4e10588194/colinta/SublimeStringEncode/issues/37 |
| og:image:alt | Base64 Decode will not decode strings with the padding characters removed. As the padding characters are technically not required to decode without ambiguity, many applications strip the padding af... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | scholtes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 03e5090f0cea887cafa036e3af34d7c668d83b5e9e9e03df72a90efb49b69cdf |
| turbo-cache-control | no-preview |
| go-import | github.com/colinta/SublimeStringEncode git https://github.com/colinta/SublimeStringEncode.git |
| octolytics-dimension-user_id | 27570 |
| octolytics-dimension-user_login | colinta |
| octolytics-dimension-repository_id | 3097155 |
| octolytics-dimension-repository_nwo | colinta/SublimeStringEncode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3097155 |
| octolytics-dimension-repository_network_root_nwo | colinta/SublimeStringEncode |
| 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 | 41f00295b9a35dca977890ab83b22788ab211dc8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width