~ubuntu-branches/ubuntu/gutsy/php5/gutsy

« back to all changes in this revision

Viewing changes to sapi/cli/tests/013.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, CVE-2007-0905, CVE-2007-0906, CVE-2007-0909, CVE-2007-0910
  • Date: 2007-02-20 17:54:46 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070220175446-nudqyuv0dfowel3r
Tags: 5.2.1-0ubuntu1
* New upstream security/bugfix release:
  - safe_mode & open_basedir bypasses inside the session extension
    [CVE-2007-0905]
  - multiple buffer overflows in various extensions and functions
    [CVE-2007-0906]
  - underflow in the internal sapi_header_op() function [CVE-2007-0907]
  - information disclosure in the wddx extension [CVE-2007-0908]
  - string format vulnerability in *print() functions on 64 bit systems
    [CVE-2007-0909]
  - possible clobbering of super-globals in several code paths
    [CVE-2007-0910]
* Adapted patches to new upstream release:
  - 006-debian_quirks.patch
  - 034-apache2_umask_fix.patch
  - 044-strtod_arm_fix.patch
* Drop 109-libdb4.4.patch: Obsolete, upstream now checks for db 4.5 and 4.4.
* Drop 114-zend_alloc.c_m68k_alignment.patch and
  115-zend_alloc.c_memleak.patch: Applied upstream.
* Add debian/patches/000upstream-str_ireplace_offbyone.patch:
  - Fix off-by-one in str_ireplace(), a regression introduced in 5.2.1.
  - Patch taken from upstream CVS:
    http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.630&r2=1.631
  - CVE-2007-0911
* debian/control: Set Ubuntu maintainer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
running PHP code before and after processing input lines with -B and -E
 
3
--SKIPIF--
 
4
<?php 
 
5
include "skipif.inc"; 
 
6
if (substr(PHP_OS, 0, 3) == 'WIN') {
 
7
        die ("skip not for Windows");
 
8
}
 
9
?>
 
10
--FILE--
 
11
<?php
 
12
 
 
13
$php = getenv('TEST_PHP_EXECUTABLE');
 
14
 
 
15
$filename_txt = dirname(__FILE__)."/013.test.txt";
 
16
file_put_contents($filename_txt, "test\nfile\ncontents\n");
 
17
 
 
18
var_dump(`cat "$filename_txt" | "$php" -n -B 'var_dump("start");'`);
 
19
var_dump(`cat "$filename_txt" | "$php" -n -E 'var_dump("end");'`);
 
20
var_dump(`cat "$filename_txt" | "$php" -n -B 'var_dump("start");' -E 'var_dump("end");'`);
 
21
 
 
22
@unlink($filename_txt);
 
23
 
 
24
echo "Done\n";
 
25
?>
 
26
--EXPECTF--     
 
27
string(18) "string(5) "start"
 
28
"
 
29
string(16) "string(3) "end"
 
30
"
 
31
string(34) "string(5) "start"
 
32
string(3) "end"
 
33
"
 
34
Done