mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: Adds a warning to the user if their secret file includes a trailing newline (#9601)
This commit is contained in:
		| @@ -17,6 +17,9 @@ if find /run/s6/container_environment/*"_FILE" -maxdepth 1 > /dev/null 2>&1; the | ||||
| 			if [[ -f ${SECRETFILE} ]]; then | ||||
| 				# Trim off trailing _FILE | ||||
| 				FILESTRIP=${FILENAME//_FILE/} | ||||
| 				if [[ $(tail -n1 "${SECRETFILE}" | wc -l) != 0 ]]; then | ||||
| 					echo "${log_prefix} Your secret: ${FILENAME##*/} contains a trailing newline and may not work as expected" | ||||
| 				fi | ||||
| 				# Set environment variable | ||||
| 				cat "${SECRETFILE}" > "${FILESTRIP}" | ||||
| 				echo "${log_prefix} ${FILESTRIP##*/} set from ${FILENAME##*/}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H