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

Address report decryption failure #239

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rkreutz
Copy link

@rkreutz rkreutz commented Mar 24, 2024

Noticed that on some instances a single report from the results payload might fail to decrypt for reasons I'm not sure why, that is not handled by FindMyController which meant that a failing report would actually show as a random location at the Atlantic Ocean (lat 0, long 0).

This PR changes that, so the controller keeps track of whatever indexes failed to be decrypted and remove them from the array of results.

@danhuanggt
Copy link

I've experienced the same issue with one of my tags and traced the weird timestamp and location to line 207 where the FindMyLocationReport's are being generated with defaults values:

var decryptedReports = [FindMyLocationReport](repeating: FindMyLocationReport(lat: 0, lng: 0, acc: 0, dP: Date(), t: Date(), c: 0), count: reports.count)

Because Date() gets the current time, with each "refresh", a failing report would place the device at coordinates 0,0 with the time of the "refresh".

Thanks you for the fix @rkreutz!

FauconSpartiate added a commit to FauconSpartiate/openhaystack that referenced this pull request May 23, 2024
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

2 participants