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

Unlogged visits parsing can cause issues #15

Open
johnmckerrell opened this issue Aug 21, 2023 · 1 comment
Open

Unlogged visits parsing can cause issues #15

johnmckerrell opened this issue Aug 21, 2023 · 1 comment

Comments

@johnmckerrell
Copy link
Member

We had a problem where the unlogged visits file was malformed and this caused the script to go into a cycle of erroring out. We need to add more checks. Basically if we read the file in and it's not false we assume that it has an array of users, we should actually check if that's true. Also later we assume if there is a user it has the correct format, again we should check that, around here:

402:      if $unloggedFile['user'].count > 0

and here:

440:          uri = URI.parse("https://docs.g......

Not sure about those line numbers as they don't seem to match what I was seeing on the doorbot but they match the copy of log cards I have locally.

@johnmckerrell
Copy link
Member Author

The bad file looks like this:

---
user:
  ! '': 6.5

I've fixed it now here 69e64f2

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