Last modified: 2014-02-12 23:38:34 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 T47644, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45644 - An autoedit of a form of a field that is restricted to a group results in bad behavior
An autoedit of a form of a field that is restricted to a group results in bad...
Status: ASSIGNED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-02 19:41 UTC by Jamie Thingelstad
Modified: 2014-02-12 23:38 UTC (History)
1 user (show)

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


Attachments

Description Jamie Thingelstad 2013-03-02 19:41:56 UTC
If you have a form that has a field that is uses the restricted option, and a user triggers an autoedit of the page (either on the page via a button or using the API), if that user is not a member of the group that the restriction is for the edit will still be allowed, but the defaults of other restricted fields will change the fields back to their defaults.

You can see the result of such an autoedit here:

http://wikiapiary.com/w/index.php?title=Wikidata&diff=prev&oldid=28756

the form has been modified to move the restricted flags for now, but you can see the form as it was during that edit here

http://wikiapiary.com/w/index.php?title=Form:Website&action=edit&oldid=28011

Ideally the initial edit should not be allowed, since the user is not a member of that restricted group. And the other restricted fields should not be reverting to their defaults.

Here is the same behavior of fields reverting to defaults and the edit being allowed when it should not have, but this time resulting from a robot using the autoedit API.

http://wikiapiary.com/w/index.php?title=Familienwortschatz&curid=13118&diff=28807&oldid=25748
Comment 1 s7eph4n 2013-04-06 16:17:06 UTC
The autoedit should now only act on the specified field. Restricting to user group needs to be done in SFFormPrinter::formHTML. Re-assigning to Yaron.
Comment 2 Yaron Koren 2013-04-07 02:31:34 UTC
f.trott - can you clarify how SFFormPrinter::formHTML() needs to change?
Comment 3 s7eph4n 2013-04-07 06:04:03 UTC
formHTML generates the target page text from the form data and the form definition. In the process it needs to check if a field is restricted and if it is leave it unchanged.

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


Navigation
Links