-
Notifications
You must be signed in to change notification settings - Fork 153
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
Item list pagination: url returned by the webex teams api is not complete #168
Labels
Milestone
Comments
oOraph
pushed a commit
to oOraph/webexteamssdk
that referenced
this issue
Nov 5, 2021
WebexCommunity#168 The Webex Teams api does not return all parameters when returning the next url link header. Consequently, the object listing can be broken or worse, can succeed without returning objects expected by the provided filter. Example: a bot needs to specify mentionedPeople=me to be allowed to list room messages. If there are several pages to be returned then the listing will fail because the mentionedPeople query parameter won't be specified when fetching the next pages Signed-off-by: xXraphXx <xXraphXx@users.noreply.github.com>
Tests not ran nor checked |
gve-vse-tim
pushed a commit
to gve-vse-tim/webexteamssdk
that referenced
this issue
Jan 14, 2022
Can we get this merged please? This is pretty significant issue for bot use cases - the fix works for me, FWIW. |
This is a good idea - even as we are very late picking it up. Let me see if I can get it in the v1.7 release. |
Already merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The sdk automatically handles the pagination for us by reusing the link: ; rel="next" header.
However the returned one can be incorrect when some parameters are specifed
The object listing can be broken or worse, can succeed while ignoring the filtering parameters for pages above the first one.
Example: a bot needs to specify mentionedPeople=me to be allowed to list room messages. If there are several pages to be returned, then the listing will fail because the mentionedPeople query parameter won't be specified when fetching the next pages
To reproduce: create a room add a bot, post more than 10 messages for the specified bot. Attempt to list messages through the webexteamssdk using the bot token
This will result in a 403 message -> can directly be manually reproduced by checking the link header in the api response (because of the missing mentionedPeople param)
The bug is actually an api bug more than an sdk one. Yet we can give a fix proposal on sdk side by reusing and amending the def _fix_next_url method in restsession.py
The text was updated successfully, but these errors were encountered: