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

eval'ing fails on non-JSON S2S response body #27

Open
oehlschl opened this issue May 7, 2019 · 0 comments
Open

eval'ing fails on non-JSON S2S response body #27

oehlschl opened this issue May 7, 2019 · 0 comments

Comments

@oehlschl
Copy link
Contributor

oehlschl commented May 7, 2019

Reported in PX chat, but we're seeing the following error after some S2S calls:

perimeterx/internal/validators/perimeter_x_s2s_validator.rb:87:in `eval': (eval):2: syntax error, unexpected '<'

I'm guessing that the < is the opening of an HTML tag, and that for some reason PX is returning a non-JSON (maybe error) response.

This occurs here:
https://github.com/PerimeterX/perimeterx-ruby-sdk/blob/master/lib/perimeterx/internal/validators/perimeter_x_s2s_validator.rb#L87

IMO the response body shouldn't be parsed until the response code is checked (which currently happens on the line below).

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