Skip to content

[Security, RFC] Streamline exception handling, prevent disclosure #929

Description

@dkarlovi

I'm testing error conditions and default exception handling for my app. Note, all of this is in production environment. This is primarily an RFC so feel free to comment on the behaviour before any action is required.

Things to note:

  • Hydra error only for SQL exception, not for DB connection issue
  • Exception messages include complete SQL or networking errors

Triggering an SQL exception + Accept: application/ld+json:

  • Status 500
  • Content-Type: application/ld+json
  • @type: error
  • hydra:description: <Complete SQL Exception message> (way too verbose)

Triggering an SQL exception + Accept: application/json:

  • Status 500
  • Content-Type: application/problem+json
  • detail: <Complete SQL Exception message> (way too verbose)

DB host down + Accept: application/ld+json:

  • Status 500
  • Content-Type: application/problem+json
  • detail: <Complete SQL Exception message> (way too verbose)

DB host down + Accept: application/json:

  • Status 500
  • Content-Type: application/problem+json
  • detail: <Complete SQL Exception message> (way too verbose)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions