documentation icon indicating copy to clipboard operation
documentation copied to clipboard

[Enhancement] Document That Special Characters Are Not Allowed in Invidious Companion Key

Open SolarisEclipse opened this issue 6 months ago • 2 comments

Description

The current Invidious Companion documentation does not explicitly state that special characters are not allowed in the SERVER_SECRET_KEY environment variable. Additionally, it does not explain why pwgen is recommended for generating the key. This can lead to user confusion when a key with special characters causes a 400 "Bad Request" error without clear guidance. This issue proposes updating the documentation to clarify these points.

Suggested Changes

Update the Invidious Companion installation guide and/or the environment variables wiki to include:

  1. A clear statement that the SERVER_SECRET_KEY must only contain alphanumeric characters (no special characters like #, !, or @).
  2. An explanation that pwgen (e.g., pwgen 16 1) is recommended because it generates secure, alphanumeric keys compatible with Invidious Companion’s requirements.
  3. An example of a valid key, e.g., fei0Che3aejaelee.
  4. A note that using special characters may result in a 400 "Bad Request" error, with a suggestion to check the key if this error occurs.

Example Documentation Text

SERVER_SECRET_KEY

The SERVER_SECRET_KEY must be a secure, random string used for communication between Invidious and Invidious Companion.

It must:

  • Contain only alphanumeric characters (letters A-Z, a-z, and numbers 0-9).
  • Avoid special characters (e.g., #, !, @, etc.), as they will cause a 400 "Bad Request" error.
  • Be at least 20 characters long for security.

We recommend generating the key using pwgen on Linux, e.g.:

pwgen 16 1

SolarisEclipse avatar May 22 '25 00:05 SolarisEclipse

Hello @SolarisEclipse,

Thank you for the detailed issue. I would like to invite you to create a PR for this file: https://github.com/iv-org/documentation/edit/master/docs/companion-installation.md

When you will have created the PR, we can review your changes and suggest some improvements. It's in Markdown format so you should not have many difficulties :).

unixfox avatar May 22 '25 13:05 unixfox

This is my first time doing anything like this on a public project, so I apologize if I am stepping on toes or otherwise acting unprofessionally.

SolarisEclipse avatar May 23 '25 00:05 SolarisEclipse