Code review comment for lp:~gl-az/percona-xtrabackup/BT-32889-history-on-server-2.2

Revision history for this message
George Ormond Lorch III (gl-az) wrote :

> The following lines:
>
> $tmp =~ s/--password=[^ ]+ /--password=... /g;
> $tmp =~ s/--encrypt-key=[^ ]+ /--encrypt-key=... /g;
>
> Should not contain spaces, i.e.:
>
> $tmp =~ s/--password=[^ ]+/--password=.../g;
> $tmp =~ s/--encrypt-key=[^ ]+/--encrypt-key=.../g;
>
> That's my fault, it was in the first incorrect version of scrub_option() I
> proposed, but then fixed in a later version.
>
> The difference is that when one of the options to be scrubbed is at the end of
> the command line, there will be no space after it, so no substitution would
> occur with the current code then.

Yeah, I see that now, good catch. Fixed and went ahead and added a test for the command_tool with encrypt-key at the end of the line to validate that it gets scrubbed correctly.

« Back to merge proposal