Closed Boy132 closed 3 years ago
This is not a bug with Pterodactyl but rather how Laravel (what the panel is written in) handles dotenv files. If you enter the credentials with double quotes during the database step, it will work as expected. I suppose a quick note in the guide warning about this during install would be helpful.
I cannot reproduce this with the information provided. Please include an example of a password being entered that is not escaped properly when stored.
I encountered this issue on a new installation when using the password "^cVgA3Vn8Mf5$3rfR9#*U". To resolve the issue, I changed the password to something simpler. This behavior seems strange to me.
I've encountered this just today, with the password #E+DjTrY$j2x/oHF
. Changing the password to only alphanumerics also solved the issue.
If I find some time, I might test out which characters cause this, but our passwords only share "#" and "$", so at least one of them is definitely the cause.
If you are doing the work in the terminal there is a set of special chars you can't use. Shells use the following for many things #@!/\
The database password was set as an environment variable in a Docker compose file, like this:
services:
pterodactyl-panel:
image: ghcr.io/pterodactyl/panel:latest
environment:
- APP_ENV=production
- APP_ENVIRONMENT_ONLY=false
- APP_THEME=pterodactyl
- APP_TIMEZONE=UTC
- DB_CONNECTION=mysql
- DB_HOST=mysql-db
- DB_PORT=3306
- DB_DATABASE=pterodactyl_panel
- DB_USERNAME=pterodactyl
- DB_PASSWORD=#E+DjTrY$j2x/oHF
- CACHE_DRIVER=redis
- SESSION_DRIVER=redis
- QUEUE_DRIVER=redis
- REDIS_HOST=redis-db
volumes:
- var:/app/var/
- nginx:/etc/nginx/http.d/
- certs:/etc/letsencrypt/
- logs:/app/storage/logs/
networks:
- backend
- apps
ports:
- 8540:80
- 8541:443
links:
- mysql-db:database
- redis-db:cache
restart: unless-stopped
Just to make sure docker isn't at fault, I've changed the password and re-deployed the container again, and here's the output of env | grep DB_PASSWORD
from within the container: DB_PASSWORD=#E+DjTrY/oHF
Background (please complete the following information):
Describe the bug & To Reproduce Assuming you want to install the panel and your database user password contains special characters like
%
,&
or#
. (And assuming that the entered credentials duringphp artisan p:environment:database
were correct.) When runningphp artisan migrate --seed --force
you'll get this error message:You can resolve this error by manually editing the
.env
file and wrap"
around the password like this:DB_PASSWORD="PASSWORD"
.Expected behavior The password is automatically wrapped with
"
, e.g.