Re: [mp2.0] Input Filter virus scan (more info)

2003-01-06 Thread Stas Bekman
Issac Goldstand wrote:

[snip]


. Notice that you may need 
to have to store the context data between filter calls, which currently 
is not supported, but I'm working on adding this feature asap.

If you need to store something in between the filter calls (filter may 
get the data in chunks, every time it's called it may only gets a chunk 
of data), the context is the way to store such data (e.g. partial bucket 
brigades, counters, etc.).

Just give me some time and I'll commit the implementation and the 
updated doc with examples. I'm experiencing some problems with not 
seeing EOS, which prevents me from completing it. Stay tuned.


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: [mp2.0] Input Filter virus scan (more info)

2003-01-05 Thread Stas Bekman
Chris Hoffmann wrote:
[...]

My need is to scan incoming data.

If anyone has used mod_vscan on incoming data or know if the All-in-One Filter example located at;
http://perl.apache.org/docs/2.0/user/handlers/filters.html#All_in_One_Filter
can do this please contact me.


I'm not familiar with mod_vscan and you don't specify how the scan 
filter works, but I see no reason why it shouldn't work, as long as all 
you need is an access to the request's headers. Notice that you may need 
to have to store the context data between filter calls, which currently 
is not supported, but I'm working on adding this feature asap.

Also all-in-one filter is an example of how to snoop on the data going 
through the filter, since you don't need the output filter, you can use 
a simpler only-input connection filter:
http://perl.apache.org/docs/2.0/user/handlers/filters.html#Connection_Output_Filters

One more thing that needs to be figured out is how to make the filter 
abort the normal request processing if the virus is discovered and 
return a 40x response.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com