Searchparams seem to be re-ordered once entering vercel #11055
Unanswered
ReturnXDev
asked this question in
General
Replies: 1 comment
-
Seems other people have a similar issue: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I was told to create a discussion here after creating a ticket about the issue I've run into.
I am integrating a third party survey provider into a website, upon competion or failure of doing a survey the user is redirected back to our site - we provide completion and termination endpoints that then get populated with data via searchparams, this is url is then hashed to avoid link manipulation and fraud.
The issue is that the urls and their params get re-ordered when coming into vercel and I'm obviously not sure why and wanting to know what to do about it. The issue is that if you hash / test the hashing of the re-ordered url the hash is not the same and the whole point of hashing here.
The site and third party are still in test mode so once you've 'setup' the link properly you can enter and choose to exit with a complete or termination option to carry on testing.
Example:
The below url is what I get in the browser - the idea being it would hit the server endpoint - get digested and then redirect the user.
Browser
BASEURL/api/features/surveys/lucid/callback/completion?pid=dsukwjhuqm26xyf&mid=fd6af1&sur=28026095&c=0.01&l=0&42=38&43=2&45=&113=&47=&122=&61076=7&96=&2189=5&97=&5729=&15297=6&hash=EW4oBxb757JMkFJfNA6RSYn2b94
Vercel logs:
BASEURL/api/features/surveys/lucid/callback/completion?hash=EW4oBxb757JMkFJfNA6RSYn2b94&97=&c=0.01&pid=dsukwjhuqm26xyf&sur=28026095&42=38&l=0&43=2&113=&122=&61076=7&2189=5&5729=&45=&47=&15297=6&96=&mid=fd6af1
Also I cant seem to see any logic in the way the supplier has returned the url, something I will check with them, initially I thought maybe those data points and then the numbers (which are question responses btw) were ascending, but no luck there.
So yes, if anyone could shine a light. Rewrites? Something I can access out of the request or headers to get the original url?
Really frustrating as I was getting so close to having this integrated.
Thank you for your time.
Beta Was this translation helpful? Give feedback.
All reactions