LinkStack icon indicating copy to clipboard operation
LinkStack copied to clipboard

Unsupported cipher or incorrect key length. Supported ciphers are: aes-128-cbc, aes-256-cbc, aes-128-gcm, aes-256-gcm

Open hugofant opened this issue 1 year ago • 7 comments

LinkStack version

4.7.6

Description

have brought the code to my website. error appears on first call of the url. all the mentioned extension here are active... would be thankful for any ideas/solutions

Details about your system

PHP 8.2

How to reproduce

url: https://ls.ryps.eu/

Possible Solution

No response

Additional Context

No response

hugofant avatar Feb 13 '24 08:02 hugofant

additional info: SSL seems to work, PHP Infos: https://ls.ryps.eu/test.php

hugofant avatar Feb 13 '24 08:02 hugofant

variable "app_key" in the .env file looked completely weird (some characters replaced with "xxxx"): APP_KEY=base64:xxxxxxxxxxxxxxxxxxxdONK8iRb/AEPCnmeQENvxEY=base64:xxxxxxxxxxxxxxxxxxxx+M3BmYQ/2kjsInFCIIKAzVA= deleting the second part starting with "=base64.." resulted in showing the setup page

hugofant avatar Feb 13 '24 10:02 hugofant

variable "app_key" in the .env file looked completely weird (some characters replaced with "xxxx"): APP_KEY=base64:xxxxxxxxxxxxxxxxxxxdONK8iRb/AEPCnmeQENvxEY=base64:xxxxxxxxxxxxxxxxxxxx+M3BmYQ/2kjsInFCIIKAzVA= deleting the second part starting with "=base64.." resulted in showing the setup page

the APP_KEY= value need to be shown like this ;) this is ok

You installed Linkstack native without docker on your own webserver ?

lastsamurai26 avatar Feb 13 '24 11:02 lastsamurai26

the APP_KEY= value need to be shown like this ;) this is ok

...don't think so, worked only after modifying it as described

You installed Linkstack native without docker on your own webserver ?

correct, i've downloaded the zip, extracted and transfered to my webserver

hugofant avatar Feb 13 '24 11:02 hugofant

...don't think so, worked only after modifying it as described

An APP_key is generated the first time the website is accessed and entered here. Quote This key is used by the Illuminate encryption service and should be set to a random string. should be set to a random 32-character string, otherwise the encrypted strings will not be secure. will not be secure. Please do this before you deploy an application! End quote

correct, i've downloaded the zip, extracted and transfered to my webserver

What do the web server logs say? if I have seen this correctly you are using LiteSpeed Webserver, maybe it has some settings regarding ciphers

lastsamurai26 avatar Feb 13 '24 11:02 lastsamurai26

base64:xxxxxxxxxxxxxxxxxxxdONK8iRb/AEPCnmeQENvxEY=base64:xxxxxxxxxxxxxxxxxxxx+M3BmYQ/2kjsInFCIIKAzVA=

i understand, but it seems that there was a problem generating the key - it's longer than 32 chars and there seem to be two keys concatenated in one field.

Please do this before you deploy an application!

that's what i've done, I've shrunk the value to 32 chars

What do the web server logs say?

as it's hosted by a provider, i've no access to the server logs

hugofant avatar Feb 13 '24 16:02 hugofant

i understand, but it seems that there was a problem generating the key - it's longer than 32 chars and there seem to be two keys concatenated in one field.

Please do this before you deploy an application!

that's what i've done, I've shrunk the value to 32 chars

Ok that is indeed strange that should not normally happen, I will test and check this

lastsamurai26 avatar Feb 13 '24 16:02 lastsamurai26