mautrix / slack

A Matrix-Slack puppeting bridge
GNU Affero General Public License v3.0
70 stars 17 forks source link

cookie_token regex doesn't accept % #59

Open michaelphagen opened 1 month ago

michaelphagen commented 1 month ago

Hello,

I've been using an older version of the bridge for a while, but when I upgraded last night I found that I can no longer login to slack. I pulled a new token and cookie and when logging in I receive the error: Invalid value for cookie_token: doesn't match regex ^xoxd-[a-zA-Z0-9/+=]+$

My cookie_token (the one starting with xoxd) contains a few % characters in it, might this be the issue?

tulir commented 1 month ago

The cookie token never contains % characters, but maybe it should accept encoded values too 🤔

michaelphagen commented 1 month ago

Perhaps it's a Firefox issue then, the instructions state to pull out the cookie token from the browser's development menu, which contains %/encoded values.

The old authentication command (login-token instead of login token) did accept these cookies.

stuartf commented 4 weeks ago

Firefox does uri escape the cookie value so it is a bit annoying to have to decode before pasting and will present an issue for less technical users

tulir commented 4 weeks ago

Less technical users should use https://github.com/mautrix/manager

Notmarrco commented 4 days ago

same issue also with firefox, manually replacing %2B with + and %2F with / did the trick, but perhaps an url parse could help before trying the regex ?