php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53703 Cannot upload patches with chars < chr(32)
Submitted: 2011-01-09 21:50 UTC Modified: 2021-08-04 10:49 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jthijssen at noxlogic dot nl Assigned: cmb (profile)
Status: Wont fix Package: Website problem
PHP Version: Irrelevant OS: NA
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
12 + 7 = ?
Subscribe to this entry?

 
 [2011-01-09 21:50 UTC] jthijssen at noxlogic dot nl
Description:
------------
The "add-a-patch" system in the php.net bug tracker will check for mime-types after uploading a patch. When a file has some low ascii-characters, it will not be detected correctly as a plain text file. The upload will not success in that case.

There are some files in the php sources that have these low ascii characters present so patches on those files cannot be uploaded correctly.

Test script:
---------------
The files:
  ext/standard/tests/strings/strip_tags_variation5.phpt 
  ext/standard/tests/strings/strip_tags_variation8.phpt 
  ext/standard/tests/strings/strip_tags_variation9.phpt 
have some low ascii characters: ^K and ^L. Because of this, linux' "file" command detect those files "incorrectly":

jthijssen@debian-jth:~/php-src-5.3$ file ext/standard/tests/strings/strip_tags_variation5.phpt 
ext/standard/tests/strings/strip_tags_variation5.phpt: data
jthijssen@debian-jth:~/php-src-5.3$ file ext/standard/tests/strings/strip_tags_variation4.phpt 
ext/standard/tests/strings/strip_tags_variation4.phpt: ASCII C program text

Expected result:
----------------
The patch should be added to the bug

Actual result:
--------------
The bug database reports an incorrect filetype (detected: application/octet-stream)

Patches

test-script (last revision 2014-08-05 18:27 UTC by sobak@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-05 18:26 UTC] sobak@php.net
-Assigned To: +Assigned To: sobak
 [2014-08-05 18:27 UTC] sobak@php.net
The following patch has been added/updated:

Patch Name: test-script
Revision:   1407263271
URL:        https://bugs.php.net/patch-display.php?bug=53703&patch=test-script&revision=1407263271
 [2014-12-31 08:24 UTC] sobak@php.net
-Assigned To: sobak +Assigned To:
 [2021-08-04 10:49 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-08-04 10:49 UTC] cmb@php.net
Even if this is still an issue, I don't think it makes sense to
address it, since pull request are much more preferred, and we may
actually consider to remove the upload patch facility altogether.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC