Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Potential security issue #25

@localheinz

Description

@localheinz

If we look at Api_Connector, we can see the following:

public function run_query($endpoint, $params, $method="GET", array $requestOptions = [])
{
    // ...

    try {
        // ...
    } catch(OAuthException2 $e) {
        print "\n";
        $error = $e->getMessage();
        print $error."\n";
    }
}

To me this seems like a two-fold problem:

  • this generates output, and could result in issues when trying to set response headers in consuming code, and sending data
  • this could possibly leak sensitive data

Seems like the only way to fix this in consuming code would be to use output buffering, so how about fixing it here instead?

The best and easiest way would be to just let the exception bubble up and let consuming code handle it, instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions