Page MenuHomePhabricator

Potentially missing </textarea> tag when editing non-existent page as blocked user
Closed, ResolvedPublic

Description

Author: nickpj

Description:
After blocking myself on a local test wiki, I tried editing a non-existent page
as a blocked anon. (In this example I went to:
http://192.168.0.64/wiki/index.php?title=XYZW&action=edit )

The HTML returned when trying to do this seems to be missing a tag for closing
the text area. (As a result of this, the second half of the HTML is shown in the
textarea, and the navbar/footer/logo/etc are missing, in both Firefox & IE.)

I'll include the HTML that I'm seeing as an attachment shortly, but basically I

think the HTML seems to need an extra line, such as:

</p><textarea id="wpTextbox1" name="wpTextbox1" cols="80" rows="25"

readonly="readonly">
+ Article does not exist</textarea>

<div class="printfooter">

Version: 1.8.x
Severity: minor

Details

Reference
bz6660

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:19 PM
bzimport set Reference to bz6660.
bzimport added a subscriber: Unknown Object (MLST).

nickpj wrote:

Example of HTML I'm seeing

Attached:

robchur wrote:

Should be fixed in SVN trunk, r. As far as I can tell, the problem was due to
wfElement() receiving a blank string under those circumstances, which caused it
to output a single container tag. I've sanitised the behaviour of the edit form
when the page doesn't exist and the user is blocked.

As a further precaution, I've also modified that part of the code to use
wfOpenElement() and wfCloseElement() in an explicit manner, so if I've not
spotted another stupid case, then we should be covered.

[Brion: This one is probably worth backporting to REL1_7]

robchur wrote:

Ack, apologies; that was r15580 and r15581.

nickpj wrote:

Thank you once again Rob!