Exceptions printed to all users

Created on 21 June 2021, over 3 years ago
Updated 19 October 2023, about 1 year ago

Problem/Motivation

If an exception is thrown from a graphql query, the exception message is printed to all users.

Steps to reproduce

Create a custom graphql field plugin that, for example, makes an external HTTP request and doesn't catch GuzzleException. When the request fails, the message usually includes the full URL with possible sensitive (secret) URL parameters.

Proposed resolution

Instead of print() use watchdog_exception().

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

🇫🇮Finland olli

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024