Open
Conversation
Owner
|
I'll give this a try here with gmail and apple. One thing, it's removing the SSL options change and read-only change from this commit: #104 |
Jopand
reviewed
Nov 10, 2022
| def is_arlo_mail(self, mail_id): | ||
| self._arlo.debug("2fa-imap: Checking if mail is Arlo mail, mail id: " + format(mail_id)) | ||
| res, msg = self._imap.fetch(mail_id, "(RFC822)") | ||
| if isinstance(msg[0][1], bytes): |
There was a problem hiding this comment.
For some reason, I have to use msg[1][1] in line 131 and 132 with my yahoo mail. Mentioning it in #96. No idea why it works differently if you've also tested with a yahoo mail
There was a problem hiding this comment.
I made a printout of msg[0][1] and msg[0][1]..
msg[0][1]: 50
... nothing else...
msg[1][1]:
b'Received: from 127.0.0.1\r\n by atlas-production.v2-mail-prod1-gq1.omega.yahoo.com pod-id atlas--production-gq1-6db95f6ddc-xz57w.gq1.yahoo.com with HTTP..... + a lot more. LOOOOOONG string containing the entire mail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I did a complete refactoring of the 2fa authentication because of multiple issues I had related to #96.
I was only using yahoo for my tests but I did multiple different tests that also covered the issue desribed in #96. These changes fixes #96 in my opinion.
The issues I had with the existing code was:
Quick description of the refactoring changes:
I did the following tests after having everything fully implemented:
I did make some changes to the code like instead of using imaplib's search function to find all mails from do_not_reply@arlo.com, I changed to get all mail ids and check the sender of the last 10 mails. The reason being that the search function did not return all mails from do_not_reply@arlo.com. The search function does not work if there's more than 10K mail ids - at least not with yahoo.