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 simple DKIM edge cases #162

Closed
Divide-By-0 opened this issue Jan 20, 2024 · 4 comments
Closed

Fix simple DKIM edge cases #162

Divide-By-0 opened this issue Jan 20, 2024 · 4 comments
Labels
bug Something isn't working easy good first issue Good for newcomers help wanted Extra attention is needed high

Comments

@Divide-By-0
Copy link
Member

Divide-By-0 commented Jan 20, 2024

If DKIM fails, try replacing all TABs in body with spaces: "another weird case, is the email supports TABs (ascii 9) rather than spaces". Note that this is an easy find and replace of tabs > spaces on the frontend + in the body parsing js code.

If the email verification fails, it might be due to forwarding. This can insert labels that convert the subject from "This is the subject" to "[Label] This is the subject". We have to strip the label from the beginning of the line in such cases that DKIM verification fails.

Note that ee would need to test all such 2^n permutations of edge cases (in this case n = 2 as the emails can be tabbed/not tabbed or labeled/not labeled, adding exponentially more time to verify in the case of a failure.

I think the zkp2p fixes are here:

see: https://github.com/zkp2p/zk-p2p/blob/develop/client/src/components/ProofGen/validation/hdfc.tsx#L85
and: https://github.com/zkp2p/zk-p2p/blob/develop/client/src/components/ProofGen/validation/venmo.tsx#L62

@Divide-By-0 Divide-By-0 added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers high easy labels Jan 20, 2024
@star-gazer111
Copy link

Hello, I'm interested to solve this. Can I be please assigned with the same?

@Bisht13
Copy link
Member

Bisht13 commented Feb 4, 2024

Hello, I'm interested to solve this. Can I be please assigned with the same?

Sure @VasuK111! Please go ahead, feel free to ping if you face any issues.

@saleel
Copy link
Member

saleel commented Apr 3, 2024

Fixed partially/mostly in #189

TABs to SPACES were not done - zkp2p seems to be replacing ASCII 9 with TAB spaces, but they are doing a very specific fix to the HDFC emails.
A generic replacer for =09 to \t was added instead - but not tested with any real emails.

@saleel
Copy link
Member

saleel commented Apr 19, 2024

Closing this as basic setup to handle such cases is done, and known issues are handled.
We can create separate issues when new problems are found.

@saleel saleel closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy good first issue Good for newcomers help wanted Extra attention is needed high
Projects
None yet
Development

No branches or pull requests

4 participants