dangogh closed pull request #3143: Fix improper file slurping in Perl
URL: https://github.com/apache/trafficcontrol/pull/3143
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/traffic_ops/app/lib/API/Iso.pm b/traffic_ops/app/lib/API/Iso.pm
index 4fe98d853..97d8f109c 100644
--- a/traffic_ops/app/lib/API/Iso.pm
+++ b/traffic_ops/app/lib/API/Iso.pm
@@ -270,7 +270,7 @@ sub generate_iso {
}
# slurp it in..
- undef $/;
+ local $/;
$data = <$fh>;
close $fh;
diff --git
a/traffic_ops/app/lib/Extensions/TrafficStats/Helper/InfluxResponse.pm
b/traffic_ops/app/lib/Extensions/TrafficStats/Helper/InfluxResponse.pm
index f4aaf5cca..2b5a4dab5 100644
--- a/traffic_ops/app/lib/Extensions/TrafficStats/Helper/InfluxResponse.pm
+++ b/traffic_ops/app/lib/Extensions/TrafficStats/Helper/InfluxResponse.pm
@@ -36,7 +36,7 @@ sub parse_retention_period_in_seconds {
my $self = shift;
my $retention_period = shift;
- undef $/;
+ local $/;
my ( $hour, $minutes, $seconds ) = $retention_period =~
/(\d*)h(\d*)m(\d*)s/ms;
diff --git a/traffic_ops/app/lib/UI/GenDbDump.pm
b/traffic_ops/app/lib/UI/GenDbDump.pm
index 6d2b14a73..3e832416d 100644
--- a/traffic_ops/app/lib/UI/GenDbDump.pm
+++ b/traffic_ops/app/lib/UI/GenDbDump.pm
@@ -40,7 +40,7 @@ sub dbdump {
}
# slurp it in..
- undef $/;
+ local $/;
my $data = <$fh>;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services