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

Fix validation of a forcedVisitorId value by using unsigned int type. #315

Merged
merged 2 commits into from
Sep 18, 2019
Merged

Fix validation of a forcedVisitorId value by using unsigned int type. #315

merged 2 commits into from
Sep 18, 2019

Conversation

eligutovsky
Copy link
Contributor

Found that setting a forcedVisitorId with the hex values of more than "7999999999999999" cannot be valid in the current implementation. The solution is just to use UInt64 instead of Int.

Example:

var a = "7999999999999999"
var b = "8000000000000000"

Int(a, radix: 16) /// Value is 8762203435012037017
UInt64(a, radix: 16) /// Value is 8762203435012037017


Int(b, radix: 16) /// Value is nil
UInt64(b, radix: 16) /// Value is 9223372036854775808

@brototyp-bot
Copy link

brototyp-bot commented Sep 16, 2019

1 Warning
⚠️ Are there any changes that should be explained in the README.md?

Generated by 🚫 Danger

@eligutovsky
Copy link
Contributor Author

@brototyp A half of forsedVisitorIDs does not work properly. Can you release a hotfix for PR?
In another way, I would fork and specify a git for a Matomo dependency at my SDK. But there is some limitation for a Cocoapod podspec file:

Podspecs cannot specify the source of dependencies. The `:git` option is not supported. `:git` can be used in the Podfile instead to override global dependencies..

@brototyp
Copy link
Member

Oh shoot. Great catch! Do you mind adding a note in the Changelog? I am fine preparing a release during the week.

@brototyp
Copy link
Member

Cheers!

@brototyp brototyp merged commit 9f8b78d into matomo-org:develop Sep 18, 2019
@brototyp
Copy link
Member

brototyp commented Sep 18, 2019

I am pushing the 7.0.1 release to CocoaPods right now.

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.

3 participants