Last modified: 2012-04-19 21:22:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29700, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27700 - Regression: Upload protection for non existing files broken
Regression: Upload protection for non existing files broken
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.17.x
All All
: High normal with 2 votes (vote)
: 1.18.0 release
Assigned To: Aaron Schulz
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-25 08:17 UTC by Raimond Spekking
Modified: 2012-04-19 21:22 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
This still seems to be broken (530 bytes, patch)
2011-07-26 20:01 UTC, Mormegil
Details

Description Raimond Spekking 2011-02-25 08:17:02 UTC
Regression: Upload protection for non existing files is broken in 1.17.
Comment 1 Derk-Jan Hartman 2011-02-25 09:14:54 UTC
dupe

*** This bug has been marked as a duplicate of bug 27470 ***
Comment 2 Raimond Spekking 2011-02-25 09:21:08 UTC
This is not a dupe. Upload protection for non existing files is a core functionality.
Comment 3 db [inactive,noenotif] 2011-02-25 20:31:44 UTC
This is a problem with r79655.

When title does not exist, the 'upload' restriction is not added any more.
Comment 4 Bryan Tong Minh 2011-02-26 14:13:08 UTC
r82853
Comment 5 Mormegil 2011-07-25 22:18:13 UTC
I’m sorry, but the functionality still does not seem to work. See http://commons.wikimedia.org/wiki/Special:Log?page=File:Wiki.png

The first thing I noticed in the code is that in verifyTitlePermissions, “createpage” is checked, while ProtectionForm works with “create”. (Which might not be the problem, I didn’t analyze the code fully.)

Also note the protection form is broken: for nonexisting files, the “upload” protection seems to be offered, but not saved (in ProtectionForm.php:save(), in the “!$this->mTitle->exists()” case, only $this->mRestrictions['create'] is used). (Not sure if this should be split to another bug.)
Comment 6 Bryan Tong Minh 2011-07-26 19:23:59 UTC
Well, the code changes were not yet synced to Wikimedia yet, so that explains that it still does not work.
Comment 7 Mormegil 2011-07-26 20:01:20 UTC
Created attachment 8825 [details]
This still seems to be broken

(In reply to comment #6)
> Well, the code changes were not yet synced to Wikimedia yet, so that explains
> that it still does not work.

Oh, dear. You mean having such an important bug fix not being deployed for _half a year_ would be an acceptable explanation? Never mind, all bug fixes I know about _have_ been deployed and http://svn.wikimedia.org/viewvc/mediawiki/branches/wmf/1.17wmf1/RELEASE-NOTES?view=markup lists bug 27700 as fixed.

And testing the behavior on the current trunk yields still the same problem.

I don’t want to dig into the overcomplicated code, but patching Title::checkActionPermissions so that the “$action == 'create'” test tests also for “$action == 'createpage'” seems to fix the problem (not saying this is a correct fix, just pointing to the problem). See the attached patch.
Comment 8 Bryan Tong Minh 2011-07-26 20:05:24 UTC
Oh right, I forgot that this that revision was indeed synced to Wikimedia. Will have a look at it later.
Comment 9 Mormegil 2011-08-16 08:00:39 UTC
(In reply to comment #8)
> Will have a look at it later.

Any idea _when_ “later”? You know… there is this image which is kept uploaded again and again on Commons…

http://commons.wikimedia.org/wiki/Special:Log?page=File:Wiki.png
Comment 10 Bryan Tong Minh 2011-08-16 08:12:19 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Will have a look at it later.
> 
> Any idea _when_ “later”? You know… there is this image which is kept uploaded
> again and again on Commons…
> 
> http://commons.wikimedia.org/wiki/Special:Log?page=File:Wiki.png

When I have time. Unlikely to be in the nearby future. For quick resolution it's probably better to find somebody else to poke at this.
Comment 11 Rob Lanphier 2011-08-26 23:34:19 UTC
I'll see if I can get someone to look at this before 1.18 (no promises).  I don't feel strongly that this is high priority or that it should be a 1.18 blocker, but I'm willing to assume it is.  Moremegil, you seem to feel this is very high priority; could you describe the problems this is causing (not just the theoretical, but maybe somehow quantify the admin load)?
Comment 12 Mormegil 2011-09-01 09:29:52 UTC
(In reply to comment #11)
> I'll see if I can get someone to look at this before 1.18 (no promises).  I
> don't feel strongly that this is high priority or that it should be a 1.18
> blocker, but I'm willing to assume it is.  Moremegil, you seem to feel this is
> very high priority; could you describe the problems this is causing (not just
> the theoretical, but maybe somehow quantify the admin load)?

Well, this seems to me rather a _visible regression_, a single user-visible functionality does not work at all (you go to ?action=protect and whatever you set there has no effect whatsoever).

I don’t think this is “very high” _priority_, I would consider it to be blocker for a _release_ (but I am in no position to make such decisions).

I am unable to quantify the admin load, I am aware only of the “upload-protect/uploaded anyway/delete/upload-protect/uploaded anyway” cycle for [[commons:File:Wiki.png]] (as I participated there); by looking at the protection log, I could find [[commons:File:Adam.jpg]] or [[commons:File:Flickr.jpg]], but those are randomly found examples, not real data.

If you couldn’t find someone to solve the bug “properly”, at least consider applying the attached patch, which is probably just a dirty hack, but at least makes it _work_.
Comment 13 Mark A. Hershberger 2011-09-08 18:09:24 UTC
taking this off deployment blocker status, making tarball blocker, assigning while Aaron reviews it
Comment 14 Aaron Schulz 2011-09-08 18:57:06 UTC
Page doesn't seems to make sense. Callers should only check 'create' and the proper permission ('createpage' or 'createtalk') should be handled in checkQuickPermissions().

According to the docs, the checkQuickPermissions function should "Check action permissions not already checked in checkQuickPermissions".
Comment 15 Aaron Schulz 2011-09-08 19:18:47 UTC
This bug may have appeared in r65898.
Comment 16 Aaron Schulz 2011-09-08 19:28:38 UTC
Should be fixed in r96601.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links