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

FSSDK-9843: Add infinity check #882

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

mandytrinh
Copy link
Contributor

@mandytrinh mandytrinh commented Dec 5, 2023

jira: https://jira.sso.episerver.net/browse/FSSDK-9843

A customer in BUG-7104 was sending 1/0 values in the tags for their events. Because the NodeJS SDK doesn't have a check against infinity, this allowed the value to be passed through subsequently broke the results API calculations.

Other SDKs (python, java) have this check, so we should add it to Node.

isNaN() can be simplified to just !isFinite() which checks for +/- infinity as well as NaN

@coveralls
Copy link

coveralls commented Dec 5, 2023

Coverage Status

coverage: 90.402% (+0.02%) from 90.387%
when pulling 95ea24a on FSSDK-9843/infinity-check-nodejs
into fc1efa0 on master.

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lib/utils/event_tag_utils/index.ts Outdated Show resolved Hide resolved
lib/utils/event_tag_utils/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@raju-opti raju-opti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raju-opti raju-opti merged commit 01b099b into master Dec 8, 2023
18 checks passed
@raju-opti raju-opti deleted the FSSDK-9843/infinity-check-nodejs branch December 8, 2023 20:01
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

5 participants