Skip to content
Commit b17fc844 authored by Sawyer X's avatar Sawyer X Committed by Daniel Povey
Browse files

[scripts] Clean up filehandle usage in split_scp.pl (#3285)

* Move to three-arg open() for security reasons:

A two-arg open() call is a security flaw, since the filename could affect
the method of opening a file. This can be very, *very* risky. If the input
comes from the command line, triggered by a system that uses information from
the customer to affect filenames, it could *easily* lead to serious security
risks.

* Replace bareword filehandles with proper variables:

When using bareword filehandles, you are creating global variables. Instead,
we're using proper scalars for the filehandles. Much safer!

This commit also closes filehandles that were left open. Perl tries to
implicitly close them for you, but it's better to be explicit.
parent b1569dbb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment