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

make AmazonInfo deserializer more robust #1224

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

brharrington
Copy link
Contributor

Prior to this change, it was easy to trigger an endless loop in
StringInterningAmazonInfoBuilder if the dataCenterInfo payload
wasn't exactly right. For example, it could be done with:

"dataCenterInfo": {
  "@class": "com.netflix.appinfo.AmazonInfo",
  "metadata": {
    "instance-id": "i-12345"
  }
}

If there wasn't a field before metadata it would skip over the
metadata field and then end up in an endless loop because it
didn't check for the end of input.

Prior to this change, it was easy to trigger an endless loop in
`StringInterningAmazonInfoBuilder` if the `dataCenterInfo` payload
wasn't exactly right. For example, it could be done with:

```
"dataCenterInfo": {
  "@Class": "com.netflix.appinfo.AmazonInfo",
  "metadata": {
    "instance-id": "i-12345"
  }
}
```

If there wasn't a field before `metadata` it would skip over the
`metadata` field and then end up in an endless loop because it
didn't check for the end of input.
@troshko111
Copy link
Contributor

troshko111 commented Jul 16, 2019

Thanks @brharrington!

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

Successfully merging this pull request may close these issues.

None yet

3 participants