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

sendMessage truncates the response sent to stdout #4

Open
twirtgen opened this issue Dec 4, 2024 · 0 comments
Open

sendMessage truncates the response sent to stdout #4

twirtgen opened this issue Dec 4, 2024 · 0 comments

Comments

@twirtgen
Copy link

twirtgen commented Dec 4, 2024

Hi,

When I manually compile the beidconnect executable under Linux:

  • GCC 14.2.1
  • boost 1.86.0
  • pcsclite 2.3.0
  • libc 2.40

I am unable to use the compiled binary to interact with the signing web app.

I noticed that the sendMessage() function truncates the last character of the response:

std::string response2 = response.substr(0, response.length() - 1);

The above line removes the last character of the string. In the case of a JSON response, the closing } is removed, resulting in a malformed JSON string. This causes the Native Messaging Extension on Firefox to fail when attempting to parse the response.

As a workaround, removing the - 1 solves the problem. I've tested this fix and it now seems to interact correctly with the Signing Box.

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

No branches or pull requests

1 participant