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
{{ message }}
Repository navigation
Receiver accept() method modifies its input parameter. #230
The receiver may destroy input payload.
For instance after calling receiver.accept(response.headers, response.data) the data member may end up as empty object.
. Even though the payload is assumed to be transformed by the parser here the parser in many cases is a "pass through" parser - doing nothing but returning the parameter. So we end up with the caller's payload object being modified.
Activity
matejvasek commentedon Jun 22, 2020
/cc @lance
lholmquist commentedon Jun 24, 2020
I'm not totally following from the link you posted. Would it be possible to post a small code example of what you are seeing?
lance commentedon Jun 24, 2020
@lholmquist the issue is here:
sdk-javascript/src/lib/bindings/http/validation/structured.js
Line 38 in fba3294
payloadis assumed to be transformed by the parser here the parser in many cases is a "pass through" parser - doing nothing but returning the parameter. So we end up with the caller'spayloadobject being modified.lholmquist commentedon Jun 24, 2020
ah, ok. sounds like a bug
matejvasek commentedon Jun 24, 2020
@lance @lholmquist note that I reproduced this on the Lance's TS rework branch, I am going to try to reproduce this on master.
matejvasek commentedon Jun 24, 2020
Yes, the "pass through" parser causes problem.
matejvasek commentedon Jun 24, 2020
I would submit PR, but I won't since @lance is going to rewrite a lot of things.