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: email address encoding in verification link #3085

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

berry-13
Copy link
Collaborator

Summary

#3084

Implements URL encoding for email addresses in verification links and decodes them upon verification.

  • Encode email addresses in sendVerificationEmail and resendVerificationEmail functions using encodeURIComponent to ensure special characters like + are correctly handled in the verification link.
  • Decode email addresses in the verifyEmail function using decodeURIComponent to accurately retrieve and validate the email address from the verification link against the database.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

I tested this by adding a +1 to my email address (e.g., berry+1@librechat.ai) and attempted to verify my email

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

Related to #3084

Implements URL encoding for email addresses in verification links and decodes them upon verification.

- **Encode email addresses** in `sendVerificationEmail` and `resendVerificationEmail` functions using `encodeURIComponent` to ensure special characters like `+` are correctly handled in the verification link.
- **Decode email addresses** in the `verifyEmail` function using `decodeURIComponent` to accurately retrieve and validate the email address from the verification link against the database.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/danny-avila/LibreChat/issues/3084?shareId=9c32df30-4156-4082-a3eb-fff54eaba5b3).
@berry-13 berry-13 linked an issue Jun 16, 2024 that may be closed by this pull request
1 task
@berry-13 berry-13 marked this pull request as ready for review June 16, 2024 19:38
@danny-avila danny-avila merged commit a338dec into main Jun 16, 2024
2 checks passed
@danny-avila danny-avila deleted the berry-13/fix-email-encoding branch June 16, 2024 20:05
danny-avila pushed a commit that referenced this pull request Aug 5, 2024
Related to #3084

Implements URL encoding for email addresses in verification links and decodes them upon verification.

- **Encode email addresses** in `sendVerificationEmail` and `resendVerificationEmail` functions using `encodeURIComponent` to ensure special characters like `+` are correctly handled in the verification link.
- **Decode email addresses** in the `verifyEmail` function using `decodeURIComponent` to accurately retrieve and validate the email address from the verification link against the database.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/danny-avila/LibreChat/issues/3084?shareId=9c32df30-4156-4082-a3eb-fff54eaba5b3).
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
Related to danny-avila#3084

Implements URL encoding for email addresses in verification links and decodes them upon verification.

- **Encode email addresses** in `sendVerificationEmail` and `resendVerificationEmail` functions using `encodeURIComponent` to ensure special characters like `+` are correctly handled in the verification link.
- **Decode email addresses** in the `verifyEmail` function using `decodeURIComponent` to accurately retrieve and validate the email address from the verification link against the database.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/danny-avila/LibreChat/issues/3084?shareId=9c32df30-4156-4082-a3eb-fff54eaba5b3).
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
Related to danny-avila#3084

Implements URL encoding for email addresses in verification links and decodes them upon verification.

- **Encode email addresses** in `sendVerificationEmail` and `resendVerificationEmail` functions using `encodeURIComponent` to ensure special characters like `+` are correctly handled in the verification link.
- **Decode email addresses** in the `verifyEmail` function using `decodeURIComponent` to accurately retrieve and validate the email address from the verification link against the database.


---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/danny-avila/LibreChat/issues/3084?shareId=9c32df30-4156-4082-a3eb-fff54eaba5b3).
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.

[Bug]: Unable to verify e-mail addresses with + sign in it
2 participants