ferdium / ferdium-server

The server component that can either be self-hosted or hosted for general purpose - for use with the ferdium thick client.
MIT License
163 stars 41 forks source link

Increase max size for passwords - Solving the "E-Mail address already in use" Error #129

Open bioluks opened 5 months ago

bioluks commented 5 months ago

Hi,

New installs are unable to register for accounts out of the box, I weren't able to do enough testing to see if it's related to password length (my one was about 40 characters). After clicking 'Create Account' it would always end up telling me "E-Mail address already in use"? I just launched the instance? Looking at issue #88 I could quickly verify it was related to the password length limiter in the code as @357up said.

Looking at the code only changing the number from 60 to 254 does the job just fine. Temporary solutions include: for PostgreSQL databases:

ALTER TABLE users ALTER COLUMN password TYPE varchar(254) ALTER COLUMN password SET NOT NULL;

and for MySQL:

ALTER TABLE `users` MODIFY `password` VARCHAR(254) NOT NULL;