// Special case in buildExemptModules()
return false;
}
- if ( $name === 'site.styles' ) {
- // HACK: Technically, 'site.styles' isn't in a separate request group.
- // But, in order to ensure its styles are in the right position,
- // pretend it's in a group called 'site'.
- $group = 'site';
- }
if ( isset( $exemptGroups[$group] ) ) {
$exemptStates[$name] = 'ready';
if ( !$module->isKnownEmpty( $context ) ) {
private function isUserJsPreview() {
return $this->getConfig()->get( 'AllowUserJs' )
- && $this->getUser()->isLoggedIn()
&& $this->getTitle()
&& $this->getTitle()->isJsSubpage()
&& $this->userCanPreview();
private function isUserCssPreview() {
return $this->getConfig()->get( 'AllowUserCss' )
- && $this->getUser()->isLoggedIn()
&& $this->getTitle()
&& $this->getTitle()->isCssSubpage()
&& $this->userCanPreview();
}
$user = $this->getUser();
+
+ if ( !$user->isLoggedIn() ) {
+ // Anons have predictable edit tokens
+ return false;
+ }
if ( !$user->matchEditToken( $request->getVal( 'wpEditToken' ) ) ) {
return false;
}