api.secret_key
from config fileUse docker image tryffel/virtualpaper:v0.3
or tryffel/virtualpaper:v0.3-arm64
.
Note: this update will introduce database migrations that may potentially fail. To make sure the migration goes smoothly, please run the following checks before doing the update. Only proceed updating if the checks pass, and test again after you have fixed possible conflicts. If there are only a few users, it’s okay to check the values from the admin UI, but the database query will give exact results.
Earlier it was possible to create several users which were not unique when lowercased. E.g. it was possible to create user with username ‘John’ and separate user with ‘john’. With v0.3 this is no longer possible and will result in a conflict. These existing users must be manually resolved before upgrading to v0.3.
The same applies to emails: several users might have had exactly or nearly same email (when lowercased). Starting with v0.3 email uniqueness will be enforced. If the system already has multiple users with the same email address, these too will result in a conflict. These email addresses will need to be manually resolved before updating the system.
Migration will fail if this is not satisfied.
E.g. usernames ‘John’ and ‘john’ are going to be invalid. One of the usernames must be changed to meet with the requirement. The safest option is to edit the username in the database and rerun the sql query until it does not return any rows.
Verify manually using the administrator UI that each username case-insensitively unique.
Find out if there are duplicate usernames by running the following database query:
SELECT username, usernames_count
FROM (
SELECT LOWER(public.users.name) AS username, COUNT(LOWER(name)) AS usernames_count FROM users
GROUP BY LOWER(name)
) q
WHERE usernames_count > 1;
If there are any rows returned, these usernames must be resolved manually.
Query for changing username:
UPDATE users SET name='<new-username>' WHERE id=<user-id>;
Migration will fail if this is not satisfied.
E.g. emails ‘John@mail.com’ and ‘john@mail.com’ are going to be invalid. One of the emails must be changed to meet with the requirement. The safest option is to edit the email in the database and rerun the sql query until it does not return any rows.
Verify manually using the administrator UI that each email is case-insensitively unique.
Find out if there are duplicate emails by running the following database query:
SELECT email, email_count
FROM (
SELECT LOWER(email) AS email , COUNT(LOWER(email)) AS email_count FROM users
GROUP BY LOWER(email)
) q
WHERE email_count > 1;
If there are any rows returned, these emails must be resolved manually.
Query for changing email:
UPDATE users SET email='<new-email>' WHERE id=<user-id>;
Edit the configuration file and remove the secret_key
from api-section.
This will invalidate all existing authentication tokens but is required in order to
generate new, longer secret key.
Only after all previous steps have been successfully completed, update the system:
api.secret_key
(set it empty) and let the server recreate the key.Use docker image tryffel/virtualpaper:v0.3
or tryffel/virtualpaper:v0.3-arm64
.