Page MenuHomePhabricator

SecurePollContentHandler::getActionOverrides results in broken links
Open, MediumPublic

Description

Currently, SecurePollContentHandler::getActionOverrides overrides ContentHandler::getActionOverrides to disable a number of actions for secure poll pages:

public function getActionOverrides() {
	// Disable write actions
	return [
		'delete' => false,
		'edit' => false,
		'info' => false,
		'protect' => false,
		'revert' => false,
		'rollback' => false,
		'submit' => false,
		'unprotect' => false,
	];
}

This results in attempting to perform any of those actions triggering nosuchactiontext, eg https://vote.wikimedia.org/w/index.php?title=SecurePoll:349&action=edit

Why exactly is info a write action?

More importantly, the display at https://vote.wikimedia.org/wiki/SecurePoll:349 includes links to View source and Page information, but neither of those links works - instead showing the viewer the error.

If the actions are not available, the links to them should also be hidden.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

If the edit, info, etc. actions aren't made valid, then the controls for those pages should be removed. The view source button shouldn't even be there if such an action is false.

How do I visit a page like your example https://vote.wikimedia.org/wiki/SecurePoll:349 on a localhost wiki? I tried http://localhost:8080/w/index.php?title=SecurePoll:1 . I would expect those two URLs to be normal wiki pages and not special pages controlled by SecurePoll, so I think I am missing something.