Edit report at https://bugs.php.net/bug.php?id=60058&edit=1
ID: 60058
Updated by: [email protected]
Reported by: david dot gero at ec dot gc dot ca
Summary: No way to upload long code samples in a bug report
Status: Open
Type: Bug
Package: Website problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
In my opinion, the only bug is the description of the "Description":
| Put short code samples in the "Test script" section below and
| upload patches and/or long code samples below.
Removing the "and/or long code samples" would make it consistent
with the other descriptions, namely the one for "Patch file":
| A patch file created using git diff (unified diff format)
and "Test script":
| A short test script you wrote that demonstrates the bug. Please
| do not post more than 20 lines of code. If the code is longer
| than 20 lines, provide a URL to the source code that will
| reproduce the bug.
I don't see an issue with an external link.
Previous Comments:
------------------------------------------------------------------------
[2011-10-28 15:41:47] david dot gero at ec dot gc dot ca
You are wrong. Changing the extension to .txt has no effect. You get the following:
Error: uploaded patch file must be text file (save as e.g. "patch.txt" or "package.diff") (detected "text/x-php")
Could not attach patch "foo.txt" to Bug #12345
Try it for yourself.
I'm betting you're using the "file" command, which does in fact say "text/x-php", no matter what the extension.
Instead of checking for mime type of "text/plain" or "text/html" or whatever, why not just check if the first five chars are "text/", and that the extension is an allowable one like ".diff" or ".txt" or whatever?
------------------------------------------------------------------------
[2011-10-13 20:52:22] [email protected]
Yes, we should allow that and disable php execution :)
In the meantime you can attach it as text, script.txt instead of .php.
------------------------------------------------------------------------
[2011-10-13 20:46:13] david dot gero at ec dot gc dot ca
Description:
------------
The Description: section of the bug report screen says "upload patches and/or long code samples below", presumably in the Patch file: section with the "Browse" button.
However, if you try to upload a .php file, it complains that the file is "text/x-php", which for some reason it doesn't consider to be text.
Please fix it to allow "text/x-php" to be uploaded. The levels of authorization needed to create a publicly accessible URL on a government web site remove the possibility of "provide a URL to the source code that will reproduce the bug".
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60058&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.