php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77594 ob_tidyhandler flips tidy.clean_output option for lifetime of php-fpm process
Submitted: 2019-02-10 00:43 UTC Modified: 2020-11-12 15:50 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: da dot net dot php dot bugs at daniel dot priv dot no Assigned: cmb (profile)
Status: Closed Package: Tidy (PECL)
PHP Version: 7.2.15 OS: Linux
Private report: No CVE-ID: None
 [2019-02-10 00:43 UTC] da dot net dot php dot bugs at daniel dot priv dot no
Description:
------------
1. Set tidy.clean_output = Off in php.ini.
2. Run ob_start('ob_tidyhandler'); in testA.php

The page is output with cleaned output as expected.

3. Run any other PHP file without calling the same function.

The output is also unexpectedly cleaned. The option is unexpectedly flipped for every subsequent request processed by the same php-fpm process.

I may be wrong (C isn't my strongest language), but I believe this just flips the option.
https://github.com/php/php-src/blob/db0079023421b8048f090ee04adb992e09132553/ext/tidy/tidy.c#L1172


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-10 02:10 UTC] kalle@php.net
Seems like the option is not reset at the module RINIT and therefore persists
 [2019-02-11 13:40 UTC] cmb@php.net
-Package: Unknown/Other Function +Package: Tidy
 [2020-11-12 15:50 UTC] cmb@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: cmb
 [2020-11-12 15:50 UTC] cmb@php.net
> Seems like the option is not reset at the module RINIT and therefore persists

That.
 [2020-11-12 15:52 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #77594: ob_tidyhandler is never reset
On GitHub:  https://github.com/php/php-src/pull/6425
Patch:      https://github.com/php/php-src/pull/6425.patch
 [2020-11-22 13:06 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=221345a013cad854718b438c9dc869332853df63
Log: Fix #77594: ob_tidyhandler is never reset
 [2020-11-22 13:06 UTC] cmb@php.net
-Status: Analyzed +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC