Add validation and complete PPA repository support implementation

Co-authored-by: awalsh128 <2087466+awalsh128@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-09-30 07:36:58 +00:00
parent 8a6446804a
commit 65ea819d3b
2 changed files with 15 additions and 0 deletions

0
apt_query-x86.log Normal file
View file

View file

@ -65,6 +65,21 @@ fi
validate_bool "${execute_install_scripts}" execute_install_scripts 4
# Basic validation for repository parameter
if [ -n "${add_repository}" ]; then
log "Validating repository parameter..."
for repository in ${add_repository}; do
# Check if repository format looks valid (basic check)
if [[ "${repository}" =~ [^a-zA-Z0-9:\/.-] ]]; then
log "aborted"
log "Repository '${repository}' contains invalid characters." >&2
log "Supported formats: 'ppa:user/repo', 'deb http://...', 'http://...', 'multiverse', etc." >&2
exit 6
fi
done
log "done"
fi
log "done"
log_empty_line