php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57056 Wrong filter.default default value
Submitted: 2006-06-01 04:13 UTC Modified: 2006-06-02 10:53 UTC
From: schroeter dot jan at web dot de Assigned: pajoye (profile)
Status: Not a bug Package: filter (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
 [2006-06-01 04:13 UTC] schroeter dot jan at web dot de
Description:
------------
The option "filter.default" has wrong default value. As documented on php.net/filter it should be "unsafe_raw". Actual it is "string".

Reproduce code:
---------------
In php.ini only the extension is loaded via "extension=filter.so". No other options for the filter module are set.

<?php
echo ini_get ( 'filter.default' )
?>

Expected result:
----------------
unsafe_raw

Actual result:
--------------
string

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-01 04:24 UTC] schroeter dot jan at web dot de
Patch should work:

--- filter_private.h    2006-05-29 17:03:08.000000000 +0200
+++ filter_private.h_   2006-06-01 10:19:10.000000000 +0200
@@ -59,7 +59,7 @@

 #define FILTER_VALIDATE_ALL           0x0100

-#define FILTER_DEFAULT                0x0201
+#define FILTER_DEFAULT                0x0204
 #define FILTER_UNSAFE_RAW             0x0204

 #define FILTER_SANITIZE_STRING        0x0201
 [2006-06-02 10:53 UTC] pierre dot php at gmail dot com
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PEAR.

Already done in cvs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC