Commit e908003d authored by Clemens Tolboom's avatar Clemens Tolboom
Browse files

Issue #2355807 by -enzo-: Fixed Error trying to disable a Rest Resource.

parent bdfb8a79
Loading
Loading
Loading
Loading
+1 −1
Changes for src/Controller/RestUIController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ class RestUIController implements ContainerInjectionInterface {
   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
   */
  public function disable($resource_id, Request $request) {
    if (!drupal_valid_token($request->query->get('token'), 'restui_disable')) {
    if (!\Drupal::csrfToken()->validate($request->query->get('token'), 'restui_disable')) {
      // Throw an access denied exception if the token is invalid or missing.
      throw new AccessDeniedHttpException();
    }