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 wrong reply size in NativeMessagingBase #1719

Merged
merged 1 commit into from
Mar 13, 2018

Conversation

olivierlemoal
Copy link

NativeMessagingBase::sendReply send incorrectly formatted payload back to keepassxc-browser extension when using some locales.

Description

  • Using length() on QString won't return correct size in bytes when string
    contains UTF-8 chars.

Motivation and context

This commit fix many bugs with keepassxc-browser when keepassxc locale is set to a language with chars represented by multiple bytes (UTF-8).
For instance, error string "Aucun identifiant trouvé" ("No logins found" in french) cause keepassxc-browser extension to disconnect from database.

How has this been tested?

This fix solves my issues in keepassxc-browser (firefox / chromium tested), with keepassxc in french.

Types of changes

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

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]

* Using length() on QString won't return correct size in bytes when string
contains UTF-8 chars.
@olivierlemoal
Copy link
Author

Rebased on release/2.3.2

@phoerious
Copy link
Member

You could have just changed the target of the old PR. ;-)

@phoerious phoerious added this to the v2.3.2 milestone Mar 13, 2018
@phoerious phoerious merged commit 3353b32 into keepassxreboot:release/2.3.2 Mar 13, 2018
droidmonkey added a commit that referenced this pull request May 8, 2018
- Enable high entropy ASLR on Windows [#1747]
- Enhance favicon fetching [#1786]
- Fix crash on Windows due to autotype [#1691]
- Fix dark tray icon changing all icons [#1680]
- Fix --pw-stdin not using getPassword function [#1686]
- Fix placeholders being resolved in notes [#1907]
- Enable auto-type start delay to be configurable [#1908]
- Browser: Fix native messaging reply size [#1719]
- Browser: Increase maximum buffer size [#1720]
- Browser: Enhance usability and functionality [#1810, #1822, #1830, #1884, #1906]
- SSH Agent: Parse aes-256-cbc/ctr keys [#1682]
- SSH Agent: Enhance usability and functionality [#1677, #1679, #1681, #1787]
@phoerious phoerious added pr: bugfix Pull request that fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Browser pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants