$elevatedText = $elevated ? 'by elevated ' : '';
$log = LoggerFactory::getInstance( "security" );
$log->warning(
- "Unsafe JS/CSS/Json $elevatedText" . "load - {user} loaded {title} with {ctype}",
+ "Unsafe JS/CSS/Json {$elevatedText}load - {user} loaded {title} with {ctype}",
[
'user' => $this->getUser()->getName(),
- 'title' => $title->getPrefixedDBKey(),
+ 'title' => $title->getPrefixedDBkey(),
'ctype' => $contentType,
'elevated' => $elevated
]
$log->info( "Blocked loading unprotected JS {title} for {user}",
[
'user' => $this->getUser()->getName(),
- 'title' => $title->getPrefixedDBKey(),
+ 'title' => $title->getPrefixedDBkey(),
]
);
throw new HttpError( 403, wfMessage( 'unprotected-js' ) );
// section not found (or section not supported, e.g. for JS, JSON, and CSS)
$text = false;
} else {
- $text = $content->getNativeData();
+ $text = $content->getText();
}
}
}