# Issues with SSO and '~' character

**URL:** <https://meta.discourse.org/t/issues-with-sso-and-character/351582>\
**Category:** Support\
**Created:** [February 11, 2025, 3:28am UTC](https://meta.discourse.org/t/issues-with-sso-and-character/351582 "2025-02-11T03:28:44Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sweetbeems](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@sweetbeems](https://meta.discourse.org/u/sweetbeems)\
**Post date:** [February 11, 2025, 3:28am UTC](https://meta.discourse.org/t/issues-with-sso-and-character/351582/1 "2025-02-11T03:28:44Z")

</div>

Hi everyone,

So recently I discovered that if I inclue ‘~’ in a user’s bios, I get a base64decode error from Discourse. It can handle all sorts of other problematic characters just fine (spaces, =, %, &) but not ~ for some reason.

Anyone else encounter this issue?

My first thought is that perhaps my encoding could be wrong, but I haven’t been able figure it out.

Here is my python implementation of the encoding:

```plaintext
return_payload = base64.urlsafe_b64encode(parse.urlencode(params).encode())

```

which is then put directly into ‘sso’ in the requests (along with all the other necessary information)

```plaintext
resp = requests.post(
       ".../admin/users/sync_sso",
        data={'sso': return_payload, ...}
        headers={...}
)

```

I’ve updated my discourse to the newest version (3.5.0.beta1-dev), still persists.

Thanks for any help!

---

_[View the full topic](https://meta.discourse.org/t/issues-with-sso-and-character/351582)._
