apache / apache/pulsar-client-node

No Error handling for Deserialize method which ends up crashing Node JS

オープン
#422 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
164
フォーク
98
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello Team

Here I am trying to serialize and deserialize messageId for my business use case

but issue is for proper error handling if in case we pass invalid buffer data to MessageId.deserialize method then it throws C++ exception
`libc++abi: terminating due to uncaught exception of type std::invalid_argument: Failed to parse serialized message id`
which is not handled by pulsar-client and node JS crashes

I see similar issue was there while creating a client too but that got fixed with this issue and PR https://github.com/apache/pulsar-client-node/pull/307/files
where it was wrapped with try catch block
but deserialize method is still not fixed

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

MessageId.deserialize から開始し、そのエラーハンドリングを PR #307 で導入されたクライアント側のハンドリングと比較してください。無効なバッファーのケースを再現し、deserialize のバインディングを追跡してください。無効な入力によって Node.js がキャッチされない C++ 例外で終了しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, javascript, node.js
領域
api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。