feat(api-server): add websocket authorization #3854
No reviewers
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#3854
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cxntered/feat/ws-authorization"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
adds authorization for websocket connections with bearer tokens (retrieved from the
/auth/:id
endpoint) using the?token
query param.if a client is unauthorized, it closes the connection with status code
1008
(policy violation) with the message "Unauthorized".not sure if this was the best way to implement authorization, but i am open to suggestions :>
if security is a concern (we are passing in the token directly in the url after all), passing in the token through the
Sec-WebSocket-Protocol
header could be an alternative, but i don't know if that's a major concern@cxntered Your system appears to be affected by the
color@5.0.1
vulnerability. We recommend checking your machine. See issue #3855 for details.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.