This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PerlIO::Via: check arg is non-NULL before using it.
[perl5.git] / pod / perl5241delta.pod
CommitLineData
f4a48a9e
SH
1=encoding utf8
2
3=head1 NAME
4
5perl5241delta - what is new for perl v5.24.1
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.24.0 release and the 5.24.1
10release.
11
12If you are upgrading from an earlier release such as 5.22.0, first read
13L<perl5240delta>, which describes differences between 5.22.0 and 5.24.0.
14
15=head1 Security
16
17=head2 B<-Di> switch is now required for PerlIO debugging output
18
19Previously PerlIO debugging output would be sent to the file specified by the
20C<PERLIO_DEBUG> environment variable if perl wasn't running setuid and the
21B<-T> or B<-t> switches hadn't been parsed yet.
22
23If perl performed output at a point where it hadn't yet parsed its switches
24this could result in perl creating or overwriting the file named by
25C<PERLIO_DEBUG> even when the B<-T> switch had been supplied.
26
27Perl now requires the B<-Di> switch to produce PerlIO debugging output. By
28default this is written to C<stderr>, but can optionally be redirected to a
29file by setting the C<PERLIO_DEBUG> environment variable.
30
31If perl is running setuid or the B<-T> switch was supplied C<PERLIO_DEBUG> is
32ignored and the debugging output is sent to C<stderr> as for any other B<-D>
33switch.
34
35=head2 Core modules and tools no longer search F<"."> for optional modules
36
37The tools and many modules supplied in core no longer search the default
38current directory entry in L<C<@INC>|perlvar/@INC> for optional modules. For
39example, L<Storable> will remove the final F<"."> from C<@INC> before trying to
40load L<Log::Agent>.
41
42This prevents an attacker injecting an optional module into a process run by
43another user where the current directory is writable by the attacker, e.g. the
44F</tmp> directory.
45
46In most cases this removal should not cause problems, but difficulties were
47encountered with L<base>, which treats every module name supplied as optional.
48These difficulties have not yet been resolved, so for this release there are no
49changes to L<base>. We hope to have a fix for L<base> in Perl 5.24.2.
50
51To protect your own code from this attack, either remove the default F<".">
52entry from C<@INC> at the start of your script, so:
53
54 #!/usr/bin/perl
55 use strict;
56 ...
57
58becomes:
59
60 #!/usr/bin/perl
61 BEGIN { pop @INC if $INC[-1] eq '.' }
62 use strict;
63 ...
64
65or for modules, remove F<"."> from a localized C<@INC>, so:
66
67 my $can_foo = eval { require Foo; }
68
69becomes:
70
71 my $can_foo = eval {
72 local @INC = @INC;
73 pop @INC if $INC[-1] eq '.';
74 require Foo;
75 };
76
77=head1 Incompatible Changes
78
79Other than the security changes above there are no changes intentionally
80incompatible with Perl 5.24.0. If any exist, they are bugs, and we request
81that you submit a report. See L</Reporting Bugs> below.
82
83=head1 Modules and Pragmata
84
85=head2 Updated Modules and Pragmata
86
87=over 4
88
89=item *
90
91L<Archive::Tar> has been upgraded from version 2.04 to 2.04_01.
92
93=item *
94
95L<bignum> has been upgraded from version 0.42 to 0.42_01.
96
97=item *
98
99L<CPAN> has been upgraded from version 2.11 to 2.11_01.
100
101=item *
102
103L<Digest> has been upgraded from version 1.17 to 1.17_01.
104
105=item *
106
107L<Digest::SHA> has been upgraded from version 5.95 to 5.95_01.
108
109=item *
110
111L<Encode> has been upgraded from version 2.80 to 2.80_01.
112
113=item *
114
115L<ExtUtils::MakeMaker> has been upgraded from version 7.10_01 to 7.10_02.
116
117=item *
118
119L<File::Fetch> has been upgraded from version 0.48 to 0.48_01.
120
121=item *
122
123L<File::Spec> has been upgraded from version 3.63 to 3.63_01.
124
125=item *
126
127L<HTTP::Tiny> has been upgraded from version 0.056 to 0.056_001.
128
129=item *
130
131L<IO> has been upgraded from version 1.36 to 1.36_01.
132
133=item *
134
135The IO-Compress modules have been upgraded from version 2.069 to 2.069_001.
136
137=item *
138
139L<IPC::Cmd> has been upgraded from version 0.92 to 0.92_01.
140
141=item *
142
143L<JSON::PP> has been upgraded from version 2.27300 to 2.27300_01.
144
145=item *
146
147L<Locale::Maketext> has been upgraded from version 1.26 to 1.26_01.
148
149=item *
150
151L<Locale::Maketext::Simple> has been upgraded from version 0.21 to 0.21_01.
152
153=item *
154
155L<Memoize> has been upgraded from version 1.03 to 1.03_01.
156
157=item *
158
159L<Module::CoreList> has been upgraded from version 5.20160506 to 5.20170114_24.
160
161=item *
162
163L<Net::Ping> has been upgraded from version 2.43 to 2.43_01.
164
165=item *
166
167L<Parse::CPAN::Meta> has been upgraded from version 1.4417 to 1.4417_001.
168
169=item *
170
171L<Pod::Html> has been upgraded from version 1.22 to 1.2201.
172
173=item *
174
175L<Pod::Perldoc> has been upgraded from version 3.25_02 to 3.25_03.
176
177=item *
178
179L<Storable> has been upgraded from version 2.56 to 2.56_01.
180
181=item *
182
183L<Sys::Syslog> has been upgraded from version 0.33 to 0.33_01.
184
185=item *
186
187L<Test> has been upgraded from version 1.28 to 1.28_01.
188
189=item *
190
191L<Test::Harness> has been upgraded from version 3.36 to 3.36_01.
192
193=item *
194
195L<XSLoader> has been upgraded from version 0.21 to 0.22, fixing a security hole
196in which binary files could be loaded from a path outside of C<@INC>.
197L<[perl #128528]|https://rt.perl.org/Public/Bug/Display.html?id=128528>
198
199=back
200
201=head1 Documentation
202
203=head2 Changes to Existing Documentation
204
205=head3 L<perlapio>
206
207=over 4
208
209=item *
210
211The documentation of C<PERLIO_DEBUG> has been updated.
212
213=back
214
215=head3 L<perlrun>
216
217=over 4
218
219=item *
220
221The new B<-Di> switch has been documented, and the documentation of
222C<PERLIO_DEBUG> has been updated.
223
224=back
225
226=head1 Testing
227
228=over 4
229
230=item *
231
232A new test script, F<t/run/switchDx.t>, has been added to test that the new
233B<-Di> switch is working correctly.
234
235=back
236
237=head1 Selected Bug Fixes
238
239=over 4
240
241=item *
242
243The change to hashbang redirection introduced in Perl 5.24.0, whereby perl
244would redirect to another interpreter (Perl 6) if it found a hashbang path
245which contains "perl" followed by "6", has been reverted because it broke in
246cases such as C<#!/opt/perl64/bin/perl>.
247
248=back
249
250=head1 Acknowledgements
251
252Perl 5.24.1 represents approximately 8 months of development since Perl 5.24.0
253and contains approximately 8,100 lines of changes across 240 files from 18
254authors.
255
256Excluding auto-generated files, documentation and release tools, there were
257approximately 2,200 lines of changes to 170 .pm, .t, .c and .h files.
258
259Perl continues to flourish into its third decade thanks to a vibrant community
260of users and developers. The following people are known to have contributed
261the improvements that became Perl 5.24.1:
262
263Aaron Crane, Alex Vandiver, Aristotle Pagaltzis, Chad Granum, Chris 'BinGOs'
264Williams, Craig A. Berry, Father Chrysostomos, James E Keenan, Jarkko
265Hietaniemi, Karen Etheridge, Leon Timmermans, Matthew Horsfall, Ricardo Signes,
266Sawyer X, Sébastien Aperghis-Tramoni, Stevan Little, Steve Hay, Tony Cook.
267
268The list above is almost certainly incomplete as it is automatically generated
269from version control history. In particular, it does not include the names of
270the (very much appreciated) contributors who reported issues to the Perl bug
271tracker.
272
273Many of the changes included in this version originated in the CPAN modules
274included in Perl's core. We're grateful to the entire CPAN community for
275helping Perl to flourish.
276
277For a more complete list of all of Perl's historical contributors, please see
278the F<AUTHORS> file in the Perl source distribution.
279
280=head1 Reporting Bugs
281
282If you find what you think is a bug, you might check the articles recently
283posted to the comp.lang.perl.misc newsgroup and the Perl bug database at
284L<https://rt.perl.org/> . There may also be information at
285L<http://www.perl.org/> , the Perl Home Page.
286
287If you believe you have an unreported bug, please run the L<perlbug> program
288included with your release. Be sure to trim your bug down to a tiny but
289sufficient test case. Your bug report, along with the output of C<perl -V>,
290will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
291
292If the bug you are reporting has security implications which make it
293inappropriate to send to a publicly archived mailing list, then see
294L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
295report the issue.
296
297=head1 SEE ALSO
298
299The F<Changes> file for an explanation of how to view exhaustive details on
300what changed.
301
302The F<INSTALL> file for how to build Perl.
303
304The F<README> file for general stuff.
305
306The F<Artistic> and F<Copying> files for copyright information.
307
308=cut