Skip to content

[3.0]: View Query on old session does not show template #8814

@jdarwood007

Description

@jdarwood007

Basic Information

Noticed while debugging that the view queries will produce an admin login page without templating. This just looks weird. Still functions normally.

Steps to reproduce

  1. Ensure your admin session is expired (Admin -> End session)
  2. Ensure that db_show_debug is enabled
  3. Click on a query at the bottom
  4. Your taking to the view query page
  5. Template is missing.

Expected result

Template

Actual result

White page with admin login form

Version/Git revision

1b91ed9

Database Engine

All

Database Version

No response

PHP Version

8.4

Logs

Additional Information

This happens because view query is defined as a simple action and then this line of code triggers the admin login

SMF/Sources/User.php

Lines 1994 to 1999 in ff4807f

// Need to type in a password for that, man.
if (!isset($_GET['xml'])) {
ACP::adminLogin($type);
}
return 'session_verify_fail';

We don't have a way to detect that we would trigger an admin login. One may be needed so we can then update the same action check based on that condition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions