iMega/docker-images

Composer: password prompt unprotected

Closed this issue · 3 comments

I ran into an issue where passwords were being prompted without secure entry for private repos.
I researched it, found that the issue was that composer's secure shell entry didn't support "sh", only one of [bash, ksh, zsh, csh]. I fixed that compatibility problem in Seldaek/cli-prompt#2 , It was merged to composer/composer master in composer/composer#5209 .

So, to fix the input problem for your (very nice and minimal, btw!) docker images, you should either:

  1. Make a bleeding edge composer image based on composer "master" / composer/composer@b018292
  2. Add a symlink into RUN section that makes a symlink ln -s /bin/sh /bin/bash (I think this works better as a quick hack until composer releases the fixed version). You can use bash/ksh/zsh as the alias (csh has different implementation, do not use!), up to you. As long as you add it as the last 'run' operation, there shouldn't be any compatibility issues.

Added PR for the latest version. Backport it to the older ones as you see fit.

iMega commented

Thanks you!

iMega commented

Fix on imega/composer:2.1.1