Skip to content

Adminer auto-login fails with non-standard database port on 2.2.3 #37

@kjonasde

Description

@kjonasde

PHP Version

8.2.28 and 8.4.19

Shopware Version

6.6.10.6 and 6.6.10.15

Plugin Version

2.2.3

Actual behaviour

When opening Adminer from the Shopware Administration, the automatic login fails if the database uses a non-standard port.

Adminer first stays blank for a short moment while the auto-login runs in the background.
After that, the browser console shows a "403 Forbidden" error and the normal Adminer login form is displayed.

The host data shown in the Adminer login form is correct, including the non-standard host setup.

Example "DATABASE_URL":
"mysql://user:pass@###.###.###.###.cloud:51974/dbname"

Additional details:

  • "printenv DATABASE_URL" inside the container shows the correct value.
  • This was tested on two separate Shopware 6.6 installations.
  • A local test setup using the default port "3306" worked.

Workaround:
As a temporary workaround, replacing the current "AdminerController.php" with the older "2.2.0" version and manually adjusting the port made the login work immediately in our case.

Expected behaviour

Adminer should auto-login successfully when "DATABASE_URL" contains a non-standard MariaDB/MySQL port.

Steps to Reproduce?

  1. Install FroshPlatformAdminer in the latest available version. (2.2.3)
  2. Use a Shopware installation with a database running on a non-standard port.
  3. Ensure "DATABASE_URL" is set correctly as an environment variable, for example:
    "mysql://user:pass@host:51974/dbname"
  4. Open Adminer via:
    "Settings => Extensions => Adminer"
  5. Observe that the automatic login fails and Adminer falls back to the manual login form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type
    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