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
child_process: validate arguments for null bytes #44782
child_process: validate arguments for null bytes #44782
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
c74b77f
to
67903b0
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This change adds validation to reject an edge case where the child_process API argument strings might contain null bytes somewhere in between. Such strings were being silently truncated before, so throwing an error should prevent misuses of this API. Fixes: nodejs#44768 Signed-off-by: Darshan Sen <raisinten@gmail.com>
67903b0
to
a6bb1c4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
cc @nodejs/child_process in case anyone else also wants to take a look. |
|
@ZYSzys I would say no because code that previously tried to pass string arguments with null bytes was already broken because the strings were silently getting truncated at the first null byte. This validation would make it easier for users to know where things went wrong. |
This comment was marked as outdated.
This comment was marked as outdated.
|
@bnoordhuis @ZYSzys would y'all like to take another look? |
|
Landed in 91dbd8b |
This change adds validation to reject an edge case where the child_process API argument strings might contain null bytes somewhere in between. Such strings were being silently truncated before, so throwing an error should prevent misuses of this API. Fixes: #44768 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #44782 Reviewed-By: James M Snell <jasnell@gmail.com>
This change adds validation to reject an edge case where the child_process API argument strings might contain null bytes somewhere in between. Such strings were being silently truncated before, so throwing an error should prevent misuses of this API. Fixes: #44768 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #44782 Reviewed-By: James M Snell <jasnell@gmail.com>
This change adds validation to reject an edge case where the
child_processAPI argument strings might contain null bytes somewhere in between. Such strings were being silently truncated before, so throwing an error should prevent misuses of this API.Fixes: #44768
Signed-off-by: Darshan Sen raisinten@gmail.com