Bug #15873 [Opn]: Can't upload patches

From: Date: Thu, 12 Feb 2009 19:01:45 +0000
Subject: Bug #15873 [Opn]: Can't upload patches
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-2@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=15873&edit=1 ID: 15873 Updated by: cweiske@php.net Reported By: daniel dot oconnor at gmail dot com Summary: Can't upload patches Status: Open Type: Bug Package: pearweb PHP Version: Irrelevant Roadmap Versions: New Comment: - fileinfo is installed - finfo::finfo(): Failed to load magic database at '/usr/share/misc/magic'. Previous Comments: ------------------------------------------------------------------------ [2009-02-10 11:09:09] dufuz We did not use fileinfo on the old one. ------------------------------------------------------------------------ [2009-02-03 13:49:34] doconnor patchtracker.php does: $finfo = new finfo(FILEINFO_MIME); ... so this smells like finfo isn't recognising mime types properly. // get mime-type for a specific file $mime = $finfo->file($file->getProp('tmp_name')); // get rid of the charset part $t = explode(';', $mime); $mime = $t[0]; if (!in_array($mime, $allowed_mime_types)) { // ARGH } Does euk1 have the same kind of mime extension as the old one? ------------------------------------------------------------------------ [2009-02-03 13:42:51] doconnor Description: ------------ 1. Upload a patch to a bug (say, this one) 2. Make sure the upload is a .txt or .diff Expect: Patch uploads Actual: FAIL! This is probably just a permissions thing Test script: --------------- Expected result: ---------------- Actual result: -------------- ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=15873&edit=1

« previous php.pear.bugs (#2) next »