Skip to content

Commit

Permalink
Use /dev/urandom to create random password (#2298)
Browse files Browse the repository at this point in the history
* Make sure generated password is random

Use /dev/urandom to get a 32 char password

* Make sure generated password is random

Use /dev/urandom to generate 32 char password

* Make sure generated password is random
  • Loading branch information
leitzler authored and lunny committed Aug 13, 2017
1 parent f960e19 commit 2282e24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN addgroup \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd

ENV USER git
ENV GITEA_CUSTOM /data/gitea
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN addgroup \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd

ENV USER git
ENV GITEA_CUSTOM /data/gitea
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rpi
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN addgroup \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd

ENV USER git
ENV GITEA_CUSTOM /data/gitea
Expand Down

0 comments on commit 2282e24

Please sign in to comment.