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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jthijssen at noxlogic dot nl
New email:
PHP Version: OS:

 

 [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-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 06:03:37 2021 UTC