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

Check push reply ends in a NUL byte #281

Open
reynir opened this issue Sep 30, 2024 · 1 comment
Open

Check push reply ends in a NUL byte #281

reynir opened this issue Sep 30, 2024 · 1 comment

Comments

@reynir
Copy link
Contributor

reynir commented Sep 30, 2024

We blindly cut off the last byte

miragevpn/src/engine.ml

Lines 581 to 587 in 8d70130

let maybe_push_reply config = function
| Some data ->
if String.equal "" data then
Error (`Msg "push request sent: empty TLS reply")
else
let str = String.sub data 0 (pred (String.length data)) in
Log.info (fun m -> m "push request sent, received TLS payload %S" str);

Thinking about it for a bit we should maybe use Cc_message for push replies as well? And maybe the server can send an EXIT message before we receive a push reply and we don't handle that.

@reynir
Copy link
Contributor Author

reynir commented Sep 30, 2024

Originally reported in #279 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant