php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71736 Conditional META HTTP-EQUIV output unconditionally
Submitted: 2016-03-08 01:51 UTC Modified: 2019-07-28 04:22 UTC
From: dlc dot usa at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.6.19 OS: CRUX 3.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dlc dot usa at gmail dot com
New email:
PHP Version: OS:

 

 [2016-03-08 01:51 UTC] dlc dot usa at gmail dot com
Description:
------------
name=php
version=5.6.19
release=1
source=(http://php.net/distributions/php-$version.tar.xz)

build () {
    cd php-$version

    local PHP_CONFIG="
    --prefix=/usr --mandir=/usr/share/man \
    --with-config-file-path=/etc/php \
    --with-config-file-scan-dir=/etc/php/conf.d \
    --with-zlib \
    --with-pcre-regex=/usr \
    --disable-static --disable-debug \
    --without-sqlite3 --without-pdo-sqlite \
    --without-pear"

    local PHP_SHARED="
    --enable-dba=shared --with-gdbm --with-db4 \
    --with-bz2=shared \
    --with-curl=shared \
    --with-openssl=shared \
    --enable-zip=shared \
    --enable-mbstring=shared"

    EXTENSION_DIR=/usr/lib/php/extensions \
    ./configure \
        $PHP_CONFIG \
        $PHP_SHARED \
        --enable-cli \
        --disable-cgi \
        --with-readline

    make
    make -j1 INSTALL_ROOT=$PKG install
    rm $PKG/usr/lib/php/extensions/*.a
    ln -sf phar.phar $PKG/usr/bin/phar

    sed -i '/^extension_dir/s|=.*$|= "/usr/lib/php/extensions"|' php.ini-*
    install -d $PKG/etc/php/conf.d
    install -m 644 php.ini-* $PKG/etc/php

    # order matters !
    printf 'extension=%s\n' {zip,bz2,curl,openssl,dba,mbstring}.so \
           > $PKG/etc/php/conf.d/extensions.ini
}


Test script:
---------------
Fails (works in 5.6.15); i.e., the engine does the echo/exit regardless of variable values:

// If all is good and the user wants to go to the home page, do it
if ( $bsi == 'y' && $vgo == 'h' )
{ echo '<META HTTP-EQUIV=Refresh CONTENT="1;URL=DLC_Home.php?mwb=' . $mwb . '">' ;
  exit ;
} ?>

Changing the "META" above to "ME' . 'TA" as below works in both releases:

// If all is good and the user wants to go to the home page, do it
if ( $bsi == 'y' && $vgo == 'h' )
{ echo '<ME' . 'TA HTTP-EQUIV=Refresh CONTENT="1;URL=DLC_Home.php?mwb=' . $mwb . '">' ;
  exit ;
} ?>

Expected result:
----------------
The original code should behave in 5.6.19 as it does in 5.6.15.

Actual result:
--------------
The refresh to the HTTP-EQUIV URL occurs (but because the original page was not properly processed due to the processing short-circuit, the refreshed page is defective).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-15 17:35 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2019-07-15 17:35 UTC] cmb@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.
 [2019-07-28 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC