Setting a password on smp-server with an '@' character breaks the Docker entrypoint script
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 68/100
Piste de recherche
Commencez par scripts/docker/entrypoint-smp-server autour de la ligne 62 et reproduisez l’échec à l’aide de la commande docker run documentée avec PASS=passw@rd. Inspectez l’invocation et sa sortie d’erreur, puis vérifiez que l’initialisation du conteneur avec un caractère @ ne se termine plus silencieusement et n’entre plus dans une boucle de redémarrage.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Issue
I went down a bit of rabbit hole before realizing my Docker setup was not the issue here, but rather it was the PASS environment variable I had set that was causing smp-server to exit with code 1 and go into a container reboot loop.
Steps to reproduce:
- Set up the the latest Docker container using simplexchat/smp-server:latest
- Configure the PASS environment variable such that it contains an '@' character.
PASS=passw@ordworks just as well. - Deploy the container and observe a totally silent failure (exit code 1) with no container logs. If the container strategy is set to reboot always, it will go into a reboot loop.
Recommend solutions:
- Update documentation to indicate that certain special characters are not allowed.
- Escape the input string properly when passing the argument to smp-server init.
I tried naively to apply the second recommendation and fix the command line parameter invocation, but after reading the first sentence of the set built-in documentation, I admit I didn't really pursue it further.
Debugging further
Starting an instance of the image and overriding the entrypoint to a shell gives us the opportunity to add some debug logs to the entrypoint script and invoke it manually for testing:
docker run --interactive --tty --entrypoint /bin/bash simplexchat/smp-server:latest
cd /usr/local/bin
export ADDR=simplex.exampledomain.local
export PASS=passw@rd
./entrypoint
In the entrypoint script, changing this line:
smp-server init --yes \
--store-log \
--daily-stats \
--source-code \
"$@" > /dev/null 2>&1
To this:
smp-server init --yes \
--store-log \
--daily-stats \
--source-code \
"$@"
reveals the underlying error. Now the entrypoint script fails with the following invocation error and usage example:
option --password: endOfInput
Usage: smp-server init [--disable-store-log | (-l|--store-log)]
[-d|--database DB_CONN] [--schema DB_SCHEMA]
[--pool-size POOL_SIZE] [-s|--daily-stats]
[-a|--sign-algorithm ALG] [--ip IP] [-n|--fqdn FQDN]
[--no-password | --password PASSWORD]
[--control-port | --control-port PORT]
[--socks-proxy | --socks-proxy PROXY]
[--own-domains DOMAINS]
[--source-code | --source-code URI]
[--operator OPERATOR_NAME]
[--operator-country OPERATOR_COUNTRY]
[--hosting HOSTING_NAME]
[--hosting-country HOSTING_COUNTRY]
[--hosting-type HOSTING_TYPE]
[--server-country SERVER_COUNTRY]
[--operator-website WEBSITE] [--web-path PATH]
[--disable-web] [-y|--yes]
Initialize server - creates /etc/opt/simplex and /var/opt/simplex directories
and configuration files
Thank you,
-DM
- Langage dominant
- Haskell
- Étoiles
- 865
- Forks
- 125
- Merge moyen
- 1 j 20 h
- PR mergées (30 j)
- 64
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de simplex-chat/simplexmq
-
xftp CLI: Generated web link is missing the /file pathPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
simplex-chat/simplexmq#1853 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 32/100
simplex-chat/simplexmq#2074 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
simplex-chat/simplexmq#2017 ·
Les mainteneurs répondent en général sous 1 jour
-
resolver: resolve .simplex names, on smp7 and then on the preset routersPeut-être pris @shumvgolove l’a pris il y a 18 jours. Ouverte
simplex-chat/simplexmq#2011 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 30/100
simplex-chat/simplexmq#1864 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de simplex-chat/simplexmq
Issues similaires
-
bug desktop
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
simplex-chat/simplex-chat#8291 ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG]: C# programs with top-level statements fail to compilePeut-être pris @AsyncNigam l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
compiler-explorer/compiler-explorer#9625 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
needs triage type: enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 3 jours
-
reflex-0.10Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
commercialhaskell/stackage#8180 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
OpenZeppelin/canton-contracts#140 ·
Les mainteneurs répondent en général sous 1 jour