I submitted a patch to trunk, and an apparently unrelated test broke.
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw
Does that just mean it's an old test that's broken for other reasons? I think the randomized user passwords broke the old API tests a few days ago, but I'm not sure.
I did change the Makefile, but in a trivial way, so I could use different PHP binaries (don't ask).
In any case I just submitted a new API test, ApiUploadTest, that works apart from the (broken?) ApiTestSetup framework. I hope to refactor it into something that can replace all the API tests in the near future. It's a lot easier to read, the naming of classes is more consistent (it made me cry to inherit from "ApiSetup") and the randomized user passwords work. I'm not saying it's perfect, or even particularly good, but it's a little better.
http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/maintenance/tests/ph...
* Neil Kandalgaonkar neilk@wikimedia.org [Tue, 02 Nov 2010 22:07:35 -0700]:
I submitted a patch to trunk, and an apparently unrelated test broke.
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw
Does that just mean it's an old test that's broken for other reasons?
I
think the randomized user passwords broke the old API tests a few days ago, but I'm not sure.
I did change the Makefile, but in a trivial way, so I could use different PHP binaries (don't ask).
In any case I just submitted a new API test, ApiUploadTest, that works apart from the (broken?) ApiTestSetup framework. I hope to refactor it into something that can replace all the API tests in the near future. It's a lot easier to read, the naming of classes is more consistent
(it
made me cry to inherit from "ApiSetup") and the randomized user passwords work. I'm not saying it's perfect, or even particularly
good,
but it's a little better.
http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/maintenance/tests/ph...
That is interesting. Recently, I've made my own simple chunked upload API and also tried to test locally, but stuck to the point that is_uploaded_file() cannot be easily emulated (for security reasons), even if you are setting global $_FILES[ $fieldName ] manually. In ideal world, there probably should be no direct access to $_FILES[] and usage of is_uploaded_file(), but all of these calls should be encapsulated into WebRequest class, imo. Dmitriy
On Wed, Nov 3, 2010 at 11:14 AM, Dmitriy Sintsov questpc@rambler.ru wrote:
In ideal world, there probably should be no direct access to $_FILES[] and usage of is_uploaded_file(), but all of these calls should be encapsulated into WebRequest class, imo.
As off r70037 and follow-ups, this has been possible.
* Bryan Tong Minh bryan.tongminh@gmail.com [Wed, 3 Nov 2010 11:22:26 +0100]:
On Wed, Nov 3, 2010 at 11:14 AM, Dmitriy Sintsov questpc@rambler.ru wrote:
In ideal world, there probably should be no direct access to $_FILES[] and
usage
of is_uploaded_file(), but all of these calls should be encapsulated into WebRequest class, imo.
As off r70037 and follow-ups, this has been possible.
Ah, I didn't knew that. The customers still mostly run 1.15.x so I am not checking the trunk very often. I should take a look at that new class. Btw, I don't see is_uploaded_file() check against "$_FILES[] injection" in the code, is that secure? Or, perhaps it already was somewhere else. But, FauxRequest would not require it, of course. Dmitriy
On Wed, Nov 3, 2010 at 1:07 AM, Neil Kandalgaonkar neilk@wikimedia.org wrote:
I submitted a patch to trunk, and an apparently unrelated test broke.
http://ci.tesla.usability.wikimedia.org/cruisecontrol/buildresults/mw
Does that just mean it's an old test that's broken for other reasons? I think the randomized user passwords broke the old API tests a few days ago, but I'm not sure.
It was was already breaking in that spot, so I won't blame you :)
I did change the Makefile, but in a trivial way, so I could use different PHP binaries (don't ask).
I'm assuming you're talking about this[0] in r75906. That shouldn't have broken anything.
-Chad
[0] http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tests/php...
wikitech-l@lists.wikimedia.org