php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39554 filter callback
Submitted: 2006-11-19 10:15 UTC Modified: 2006-11-19 17:05 UTC
From: xmlich02 at stud dot fit dot vutbr dot cz Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5.2.0 OS: any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-11-19 10:15 UTC] xmlich02 at stud dot fit dot vutbr dot cz
Description:
------------
it is possible to add into php any callback function which handles spam?

Reproduce code:
---------------
var_dump(filter_var($_REQUEST['message'], FILTER_CALLBACK, 'antispam'));


function antismap($message) {
  return exec('spamassasin $message');
}

// i can't use exec because of safe mode.
// so it whould be nice to have any
// option to embeded antispam function

Expected result:
----------------
set_ini (antispam, '/usr/bin/spamassasin');
var_dump(filter_var($_REQUEST['message'], FILTER_ANTISPAM));


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-19 17:05 UTC] derick@php.net
No, we can't do this as this would allow everybody to break out of safemode.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 21:01:29 2024 UTC