You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a custom serialize method that is passed to axios by options.paramsSerializer.
It's work fine with axios@0.28.0, but from axios@0.28.1, it throw the error :
Just wanted to note this is also affecting me -- this issue combined with issue #6262 means that if for whatever reason I need to pass the paramsSerializer as a function, then I cannot upgrade to any 0.28.x version, which is a problem because I'm trying to fix GHSA-wf5p-g6vw-rhxx.
I've opened a PR to fix this (linked above) and would greatly appreciate if I could get a maintainer to take a look!
(Sorry Benjamin if this is stepping on your toes, the tests you copied over didn't run and I don't know what the etiquette is for this sort of change).
Describe the bug
We have a custom serialize method that is passed to axios by
options.paramsSerializer
.It's work fine with axios@0.28.0, but from axios@0.28.1, it throw the error :
To Reproduce
No response
Code snippet
Expected behavior
The HTTP request is executed (like in 0.28.0).
Axios Version
0.28.1
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
The problem come from the commit 111811eadc849c08a3a2074930c50f68afa6eba5.
In axios.js, this check was added :
And
validator.assertOptions
throw the error when the first parameter isn't a object.Moreover, the next line manage the case where
paramsSerializer
is a function :A solution will be to down the check after the below line transform
paramsSerializer
from function to object, so the check will be ok.The text was updated successfully, but these errors were encountered: