Page MenuHomePhabricator

Long article emptied when edited
Closed, ResolvedPublic

Description

Author: cazfi74

Description:
User told me that she had been adding stuff to already long article. When she saved her changes, whole article was emptied.

This warning I, as server admin, got to my email is probably related:
suhosin[443]: ALERT - configured request variable
value length limit exceeded - dropped variable 'wpTextbox1' ... wiki/index.php

While user agreed that article was overlong and should have been divided to several separate articles, completely losing her edits and even emptying existing article is not what should have happened.


Version: 1.12.x
Severity: normal

Details

Reference
bz26298

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:20 PM
bzimport set Reference to bz26298.
bzimport added a subscriber: Unknown Object (MLST).

This looks more like a misfeature in suhosin than a MediaWiki bug, but we probably could be more careful about not treating a missing wpTextbox1 field as empty.

To resolve this, edit your php.ini and raise the limits in suhosin.request.max_value_length and suhosin.post.max_value_length settings to more reasonable values.

As a helper for users hit by this, I've made a tweak on trunk in r82102 to check for the case of a missing wpTextbox1 field (which I can confirm when installing Suhosin and setting the suhosin.request.max_value_length absurdly low). This extends the previous behavior to check for incomplete form submissions by just checking if the edittime (a late field) is present; and also I added a message to show when it forces those previews.

So now when someone hits this sort of filter, it'll force a preview. Unfortunately that'll show a big empty box, but at least you'll know it's because something went wrong, and it won't save it silently.