Skip to content
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

Paginated API URL's should be excluded from being escaped #22

Open
jhofstede opened this issue Sep 18, 2019 · 0 comments
Open

Paginated API URL's should be excluded from being escaped #22

jhofstede opened this issue Sep 18, 2019 · 0 comments

Comments

@jhofstede
Copy link

When I query an paginated endpoint with a date-filter, next-refs are double escaped.

If you start with a paginated request like this.

client.get('/logs?since=2019-08-01T00:00:00.000Z&until=2019-08-15T00:00:00.000Z&filter=eventType+eq+"user.session.start"', paginate: true)

The raw response of the HTTP-request will contain a link to the next page:

/logs?after=1565220135395_1&filter=eventType+eq+%22user.session.start%22&since=2019-08-01T00%3A00%3A00.000Z&until=2019-08-15T00%3A00%3A00.000Z

But request (found here) will also URI-escape the already escaped URL, resulting in double escaped URI's and hence in a Oktakit::BadRequest

/logs?after=1565220135395_1&filter=eventType+eq+%2522user.session.start%2522&since=2019-08-01T00%253A00%253A00.000Z&until=2019-08-15T00%253A00%253A00.000Z

Oktakit::BadRequest: 400 - The date format in your query is not recognized. Please enter dates using the Internet Date/Time Format profile of ISO 8601.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant