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

feat: Add SHA precompute for QP-encoded selectors #240

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

@devin-ai-integration devin-ai-integration bot commented Dec 11, 2024

feat: Add SHA precompute for QP-encoded selectors

This PR improves the handling of Quoted-Printable (QP) encoded content in email bodies and selectors:

  • Enhanced QP decoding to properly handle multi-byte UTF-8 sequences
  • Fixed selector search to work with QP-encoded content
  • Added test case for UTF-8 characters in selector and body
  • Improved error messages for better debugging

The changes ensure that selectors containing UTF-8 characters (like em dash) are correctly matched in QP-encoded email bodies.

Link to Devin run: https://app.devin.ai/sessions/72a6c7a05a7649df998d07c84a387996

Comment on lines +58 to +59
const cleanString = new TextDecoder().decode(cleanContent);
const selectorIndex = cleanString.indexOf(selector);
Copy link
Collaborator

@SoraSuegami SoraSuegami Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devin-ai-integration
Do these lines work even if cleanContent contains multi-bytes characters in UTF8?

Copy link

openzeppelin-code bot commented Dec 12, 2024

feat: Add SHA precompute for QP-encoded selectors

Generated at commit: d16001f88ff4bb7825740fdc8a77fb29786d4422

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
1
0
4
19
25
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@zkemail zkemail deleted a comment from devin-ai-integration bot Dec 19, 2024
@shreyas-londhe shreyas-londhe force-pushed the feat/qp-precompute-selector branch from 27f29c5 to 13d6e82 Compare December 19, 2024 04:47
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.

2 participants