Commit abe90a00 authored by catch's avatar catch

Issue #2196805 by divesh.kumar: Convert all calls to check_plain() in core to...

Issue #2196805 by divesh.kumar: Convert all calls to check_plain() in core to Drupal\Component\Utility\String::checkPlain() in ban module.
parent e871186f
......@@ -13,6 +13,7 @@
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\ban\BanIpManager;
use Drupal\Component\Utility\String;
/**
* Ban subscriber for controller requests.
......@@ -45,7 +46,7 @@ public function __construct(BanIpManager $manager) {
public function onKernelRequestBannedIpCheck(GetResponseEvent $event) {
$ip = $event->getRequest()->getClientIp();
if ($this->manager->isDenied($ip)) {
$response = new Response('Sorry, ' . check_plain($ip) . ' has been banned.', 403);
$response = new Response('Sorry, ' . String::checkPlain($ip) . ' has been banned.', 403);
$event->setResponse($response);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment