Skip to content

Conversation

martgil
Copy link
Collaborator

@martgil martgil commented Jan 9, 2025

This PR proposed a hotfix in the FlowCrypt browser extension for an issue that exists when sending password messages.

close #5896


Tests (delete all except exactly one):

  • Does not need tests (refactor only, docs or internal changes)

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@martgil martgil requested a review from sosnovsky as a code owner January 9, 2025 07:16
@martgil
Copy link
Collaborator Author

martgil commented Jan 9, 2025

Hello @sosnovsky - please kindly check if this hotfix looks good to you. I'll be sending the screen recording via email. Thanks!

Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

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

current solution affects all sent messages, while issue happens only for password-protected messages with accented characters in recipient name.
let's apply fix only for such cases.

in webPortalMessageUpload we use formatEmailWithOptionalName method for formatting recipient emails before uploading message. there we can also transform accented characters to their non-accented versions (Š will become S, ř -> r etc).

then implemented solution won't affect other messages and make it possible to send password-protected messages to all recipients.

@martgil
Copy link
Collaborator Author

martgil commented Jan 14, 2025

current solution affects all sent messages, while issue happens only for password-protected messages with accented characters in recipient name. let's apply fix only for such cases.

in webPortalMessageUpload we use formatEmailWithOptionalName method for formatting recipient emails before uploading message. there we can also transform accented characters to their non-accented versions (Š will become S, ř -> r etc).

then implemented solution won't affect other messages and make it possible to send password-protected messages to all recipients.

You’re right. I’ve followed your instructions, and this has helped me improve in providing a fix. Unfortunately, adding a test doesn’t seem feasible since the transformation of text only occurs and becomes visible right when the request is sent. I verified the fix by inspecting the request sent by the browser extension to shared-tenant-fes. Indeed, my changes correctly replace accented characters with their non-accented versions.

One can verify this change by adding a recipient on contacts.google.com with accented characters. Then, send a password-protected message to them using the extension while monitoring the network traffic. Specifically, watch the request sent to shared-tenant-fes, more precisely to POST https://flowcrypt.com/shared-tenant-fes/api/v1/message.

@martgil martgil requested a review from sosnovsky January 14, 2025 06:37
@martgil martgil requested a review from sosnovsky January 17, 2025 07:38
@martgil
Copy link
Collaborator Author

martgil commented Jan 17, 2025

@sosnovsky This one is ready for a review again. I've also manually tested this and it works as it should. The accented characters where being replaced leads to 200 OK when sending the upload to FES.

Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

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

Nice temporary fix 👍

@sosnovsky sosnovsky merged commit 07628f4 into master Jan 17, 2025
13 checks passed
@sosnovsky sosnovsky deleted the issue-5896-bad-recipient-hotfix branch January 17, 2025 12:53
@martgil
Copy link
Collaborator Author

martgil commented Jan 18, 2025

Yes, it wouldn't be possible without your help. thank you, too.

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.

Add a hotfix for error (err: bad recipient) issue

2 participants