-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filesUploadV2 does not foward token override argument to sub methods #1644
Comments
Hi @maclockard thanks for writing in 💯 This could definitely be a bug, could you provide me with more context on how this issue is being created? For some context the |
So in this case we have a shared WebClient with no token defined. We use the token override argument so that requests can use a specific users credentials. I can see an argument that one should maybe create a WebClient per request/token. In that case there should not be a token override argument at all, since making some requests with it vs the base token with no transparency to the caller feels ripe for security issues. |
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized. |
Still relevant |
Looking at this issue, I believe the problem is that we don't pass token to the following two calls:
Since both of the above methods are private, I think changing these methods to accept the |
I added tests exhibiting this failure to the |
FYI the fix here was released in v7 of web-api. |
Packages:
Select all that apply:
@slack/web-api
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
@slack/types
Reproducible in:
The Slack SDK version
Node.js runtime version
v16.20.1
OS info
Bug:
The
filesUploadV2
does not forward thetoken
override argument passed into its options to all of the SDK calls it makes. See this block of code here: https://github.com/slackapi/node-slack-sdk/blob/%40slack/web-api%406.9.0/packages/web-api/src/WebClient.ts#L419-L436The result is that is the token override has permissions the clients base token does not, some calls may unexpectedly fail or happen on behalf of another client.
The text was updated successfully, but these errors were encountered: