sergiotapia / magnetissimo

Web application that indexes all popular torrent sites, and saves it to the local database.
MIT License
2.98k stars 187 forks source link

cookie store expects conn.secret_key_base to be at least 64 bytes #155

Closed rozatoo closed 1 year ago

rozatoo commented 1 year ago

Getting this error when using a secret key below 64 bytes. Since the docker-compose.yml says You should change this to a random 32 to 64 character string I believe this is a bug

Another issue I'm having once I set a 64 character string is: image

When opening the it shows that the web socket connection is returning 403 Forbidden.

I am using Docker Desktop on Windows

sergiotapia commented 1 year ago

@rozatoo That key is usually generated using mix phx.gen.secret.

https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Secret.html

Someone suggested you can also use openssl - did you try that?

openssl rand -base64 48

If this works for you, I should edit the docker-compose.yml comment to be explicit about using the openssl command or the mix phx.gen.secret command.

rozatoo commented 1 year ago

When I used

openssl rand -base64 32

it did not work but when I used

openssl rand -base64 64

it did

sergiotapia commented 1 year ago

Interesting, I'll update the comment then, thanks for reporting this.