HomePhabricator

Add getLoginSecurityLevel() support to FormSpecialPage
63a9098e9cafUnpublished

Tags
None
Referenced Files
None
Subscribers
None

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add getLoginSecurityLevel() support to FormSpecialPage

The base SpecialPage will handle reauthentication automatically if you
just implement getLoginSecurityLevel() to return an appropriate string.

But it doesn't work with FormSpecialPage, and if you try calling
checkLoginSecurityLevel() manually it'll lose any post data if the
reauth happens when the form is posted.

So this patch has SpecialPage::checkLoginSecurityLevel() preserve post
data across reauth (using logic similar to that in AuthManagerSpecialPage),
and has FormSpecialPage call checkLoginSecurityLevel() in the same
way the base SpecialPage does.

It also fixes the SpecialPage logic to not call
checkLoginSecurityLevel() when the special page doesn't implement
getLoginSecurityLevel(), as was the originally-intended behavior.
Apparently almost nothing actually gets to SpecialPage::execute() or
this would probably have been noticed already.

Change-Id: Ic89dc1b6583aaecd2efe3f5109896148a188c271
(cherry picked from commit bfc4e41636aca33b943f8522024bd9f8eeac1977)

Details

Provenance
AnomieAuthored on May 9 2018, 6:53 PM
ReedyCommitted on May 29 2019, 1:06 PM
Parents
rMWde69db1e2263: Add/update RELEASE-NOTES to match commits
Branches
Unknown
Tags
Unknown
ChangeId
Ic89dc1b6583aaecd2efe3f5109896148a188c271