#1342: mimetype check for uploaded files in AgaviBaseFileValidator
------------------------------+---------------------------------------------
 Reporter:  behrooz@…         |       Owner:  dominik
     Type:  enhancement       |      Status:  new    
 Priority:  normal            |   Milestone:  1.0.5  
Component:  validation        |     Version:  1.0.4  
 Severity:  normal            |    Keywords:         
Has_patch:  1                 |  
------------------------------+---------------------------------------------

Comment(by david):

 Discussed on IRC:
 {{{
 13:05 < Wombert> everplays: could you change the patch to use fileinfo's
 OO interface?
 13:06 < everplays> yeah
 13:06 < Wombert> $finfo = new finfo(...); and $finfo->file(...); and stuff
 13:06 < Wombert> also, everplays
 13:07 < Wombert> I think it's too dangerous to rely on submitted finfo
 13:07 < Wombert> what I would do is
 13:07 < Wombert> add an initialize()
 13:07 < Wombert> check if the mime_type argument is there
 13:07 < Wombert> if it is, and if finfo isn't loaded, throw an exception
 13:08 < Wombert> also, not sure if the param name should be "mime_type" or
 "mime_types"
 13:08 < Wombert> add the ?> again at the end of the file :)
 13:09 < Wombert> and add yourself to the @author list if you want
 }}}

-- 
Ticket URL: <http://trac.agavi.org/ticket/1342#comment:2>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5



_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to