Search code examples
shopware6

Shopware 6.5: Key provided is shorter than 2048 bits, only 1024 bits provided


The login to the admin does not work after a new installation of shopware 6.5. After entering correct username and passwor, the following error appears in the console: Key provided is shorter than 2048 bits, only 1024 bits provided

Tested on a standard environment at Mittwald: PHP 8.5 and MySQL 8.0.25-15 - installation via Composer.

Password has already been changed and a new user created - both via console. Still the same error.

See also: https://forum.shopware.com/t/fehler-nach-6-5-installation-key-provided-is-shorter-than-2048-bits-only-1024-bits-provided/98739


Solution

  • The issue is that the openssl config default config on that system is configured to use a default key_length of 1024 bits.

    As a workaround you can change that system wide default value to 2048 bits and run the bin/console system:generate-jwt-secret --force command.

    We will fix the generation to always generate a key with a valid length independent of the system wide openssl configuration for the final 6.5 version.