Skip to content

Commit 2282e24

Browse files
leitzlerlunny
authored andcommitted
Use /dev/urandom to create random password (#2298)
* 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
1 parent f960e19 commit 2282e24

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN addgroup \
2424
-u 1000 \
2525
-G git \
2626
git && \
27-
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
27+
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
2828

2929
ENV USER git
3030
ENV GITEA_CUSTOM /data/gitea

Dockerfile.aarch64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN addgroup \
2323
-u 1000 \
2424
-G git \
2525
git && \
26-
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
26+
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
2727

2828
ENV USER git
2929
ENV GITEA_CUSTOM /data/gitea

Dockerfile.rpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN addgroup \
2424
-u 1000 \
2525
-G git \
2626
git && \
27-
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
27+
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
2828

2929
ENV USER git
3030
ENV GITEA_CUSTOM /data/gitea

0 commit comments

Comments
 (0)