Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

All data in request body is getting converted to strings #436

Closed
bcooksey opened this issue May 30, 2019 · 2 comments
Closed

All data in request body is getting converted to strings #436

bcooksey opened this issue May 30, 2019 · 2 comments

Comments

@bcooksey
Copy link
Contributor

What would you like to change?

While testing something in legacy-scripting-runner, I found that all the numbers in my request are being converted to strings. Tracing it through with debugger, I landed on the coersion happening in this block. This change was introduced in zapier/zapier-platform-core#152

I believe this may only be an issue for legacy-scripting-runner, because it does a round of replacement itself before calling z.request.

Your Environment

This is a build of core from master with legacy-scripting-runner dependency bumped to 3.1.0

@bcooksey
Copy link
Contributor Author

I think the root issue that converted apps are running into is this early return. Since there is no curlies, we return out as is, which means we skip the part where we were supposed to set out back to the actual value.

As far a solutions go for this one, we could go a couple routes:

  1. Remove the number -> string coercion and put that down in the logger, which is what Censor sensitive numbers zapier-platform-core#152 was originally a fix for
  2. See if legacy-scripting-runner still needs to do this early curly replacement. Maybe that can be left to core now that we've improved it.

@xavdid
Copy link
Contributor

xavdid commented Jun 4, 2019

this is fixed in zapier/zapier-platform-core#155 if you want to take a peek.

@xavdid xavdid closed this as completed Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants