X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/c36d2fa896e9ea42c0b6b0135ba04b4f4f60950f..1332327f5e9fa394076b5a80b2678e9c2fa0bb48:/doc/plugins/contrib/cvs/discussion.mdwn diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index e1fa6e428..1f0ce0102 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -52,6 +52,10 @@ the "cvs add " call and avoid doing anything in that case? >>>>>> I don't see how there could possibly be a difference between >>>>>> ikiwiki's C wrapper and your shell wrapper wrapper here. --[[Joey]] +>>>>>>> I was comparing strings overly precisely. Fixed on my branch. +>>>>>>> I've also knocked off the two most pressing to-do items. I +>>>>>>> think the plugin's ready for prime time. --[[schmonz]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem @@ -89,3 +93,35 @@ the "cvs add " call and avoid doing anything in that case? >>> if a configured post-commit hook is missing, and it seems fine, >>> probably also thanks to IPC::Cmd. >>> --[[schmonz]] + +---- + + +Further review.. --[[Joey]] + +I don't understand what `cvs_shquote_commit` is +trying to do with the test message, but it seems +highly likely to be insecure; I never trust anything +that relies on safely quoting user input passed to the shell. + +(As an aside, `shell_quote` can die on certian inputs.) + +Seems to me that, if `IPC::Cmd` exposes input to the shell +(which I have not verified but its docs don't specify; a bad sign) +you chose the wrong tool and ended up doing down the wrong +route, dragging in shell quoting problems and fixes. Since you +chose to use `IPC::Cmd` just because you wanted to shut +up CVS stderr, my suggestion would be to use plain `system` +to run the command, with stderr temporarily sent to /dev/null: + + open(my $savederr, ">&STDERR"); + open(STDERR, ">", "/dev/null"); + my $ret=system("cvs", "-Q", @_); + open(STDERR, ">$savederr"); + +`cvs_runcvs` should not take an array reference. It's +usual for this type of function to take a list of parameters +to pass to the command. + +> Thanks for reading carefully. I've tested your suggestions and +> applied them on my branch. --[[schmonz]]