mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	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
This commit is contained in:
		
				
					committed by
					
						
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							f960e19c59
						
					
				
				
					commit
					2282e24028
				
			@@ -24,7 +24,7 @@ RUN addgroup \
 | 
				
			|||||||
    -u 1000 \
 | 
					    -u 1000 \
 | 
				
			||||||
    -G git \
 | 
					    -G git \
 | 
				
			||||||
    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 USER git
 | 
				
			||||||
ENV GITEA_CUSTOM /data/gitea
 | 
					ENV GITEA_CUSTOM /data/gitea
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@ RUN addgroup \
 | 
				
			|||||||
    -u 1000 \
 | 
					    -u 1000 \
 | 
				
			||||||
    -G git \
 | 
					    -G git \
 | 
				
			||||||
    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 USER git
 | 
				
			||||||
ENV GITEA_CUSTOM /data/gitea
 | 
					ENV GITEA_CUSTOM /data/gitea
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@ RUN addgroup \
 | 
				
			|||||||
    -u 1000 \
 | 
					    -u 1000 \
 | 
				
			||||||
    -G git \
 | 
					    -G git \
 | 
				
			||||||
    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 USER git
 | 
				
			||||||
ENV GITEA_CUSTOM /data/gitea
 | 
					ENV GITEA_CUSTOM /data/gitea
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user