Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic error when attempting to view a private Person Report #707

Closed
jefft opened this issue Mar 31, 2021 · 0 comments
Closed

Generic error when attempting to view a private Person Report #707

jefft opened this issue Mar 31, 2021 · 0 comments

Comments

@jefft
Copy link
Contributor

jefft commented Mar 31, 2021

Under Persons -> Reports one has the choice of setting a report's Visibility to "everyone" or "only to me".

If a "Visible only to me" report URL is inadvertently shared and clicked by someone else, the viewer gets a generic "An error occurred. Please contact your system administrator for help. " error, and a stacktrace is generated:

Cannot load report that belongs to another user!
Line 1748 of /srv/www/jethro/2.30.5/db_objects/person_query.class.php

USER:       1
REFERER:    https://jethro.example.com/?view=persons__reports&queryid=568
USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15

REQUEST:
Array
(
    [view] => persons__reports
    [queryid] => 568
    [_sizeDetector] => Array
        (
            [width] => 2430
            [height] => 1221
        )

    [username] => jbloggs
    [login_key] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
)


BACKTRACE:
Array
(
    [0] => Array
        (
            [file] => /srv/www/jethro/2.30.5/db_objects/person_query.class.php
            [line] => 1748
            [function] => trigger_error
            [args] => Array
                (
                    [0] => Cannot load report that belongs to another user!
                    [1] => 256
                )

        )

    [1] => Array
        (
            [file] => /srv/www/jethro/2.30.5/include/db_object.class.php
            [line] => 44
            [function] => load
            [class] => Person_Query
            [type] => ->
            [args] => Array
                (
                    [0] => 568
                )

        )

    [2] => Array
        (
            [file] => /srv/www/jethro/2.30.5/db_objects/person_query.class.php
            [line] => 61
            [function] => __construct
            [class] => db_object
            [type] => ->
            [args] => Array
                (
                    [0] => 568
                )

        )

    [3] => Array
        (
            [file] => /srv/www/jethro/2.30.5/views/view_3_persons__3_reports.class.php
            [line] => 16
            [function] => __construct
            [class] => Person_Query
            [type] => ->
            [args] => Array
                (
                    [0] => 568
                )

        )

    [4] => Array
        (
            [file] => /srv/www/jethro/2.30.5/include/system_controller.class.php
            [line] => 130
            [function] => processView
            [class] => View_Persons__Reports
            [type] => ->
            [args] => Array
                (
                )

        )

    [5] => Array
        (
            [file] => /srv/www/jethro/2.30.5/index.php
            [line] => 58
            [function] => run
            [class] => System_Controller
            [type] => ->
            [args] => Array
                (
                )

        )

)

It would be nice if the actual error message could be fished out and presented to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant