-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When postgres is used, the setup fails if username contains a dash #13318
Comments
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you! |
Just tested with Nextcloud v25.0.2, the issue still exists. I can't create a user with a dash in the username. |
Edit: I'm very sorry, I just tested it again at it seems that it works now, even though I did get a notification that (quote) "an error occurred". But creating a user with a dash in it is possible now (or, better, I do have a user now with a dash sign in it). Not sure why I got the notification, though, because the Nextcloud logs don't report an error (I'm a bit confused honestly). |
Okay, thanks for the follow-up. |
I can't setup a admin account with hyphen in username using 25.0.4 image. Here is the
It failed to create an admin account The error message from postgres:
|
Hi, please create a new issue for this with up-to-date information. Thanks! |
Steps to reproduce
Expected behaviour
Nextcloud should then use the postgres superuser to create a Nextcloud only user, insert the data into the config.php, and continue to setup the Nextcloud instance.
Actual behaviour
Nextcloud tries to create the oc_kopf-it user, but fails. The error I get is:
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7[ FATAL: password authentication failed for uer "oc_kopf-it"
Using KopfIT or any other name not containing a dash circumvents the problem. I know this sounds like a Postgres problem (or a problem Postgres should solve, not Nextcloud), but after searching for similar error message on The Internet™ I came to the conclusion it might be an error in the Nextcloud postgres driver. It seems the username postgres tries to create is not escaped in the right way.
Server configuration
Operating system: Ubuntu 18.04.1 LTS
Web server: Caddy
Database: Postgres
PHP version: 7.2.13
Nextcloud version: 15.0.0
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install, using the docker image
Where did you install Nextcloud from: Docker Hub
The text was updated successfully, but these errors were encountered: