From acd4178c8bd79f310c17adaca89930a96cbf7562 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 8 May 2021 22:40:25 +0200 Subject: [PATCH] webbuild-cgi: filter out invalid characters from some responses --- webbuild/webbuild-cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 4de4988..93ee7e2 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -1199,10 +1199,10 @@ if [ "$MAINTAINERMODE" = "true" ]; then curl -L -s $REPS_BASE_URL/distromatic/$REPOSITORY/_recent.inc > $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY curl -L -s $REPS_BASE_URL/$REPOSITORY/distromatic.log > $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY fi - cat $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY | sed "s|a \(href=.\)/|a target=new \1${SITE_BASE_URL}/|g" + iconv -c $WEBBUILD_STATEDIR/cache/repository-recent-$REPOSITORY | tr -d '\000-\011\013\014\016-\037' | sed "s|a \(href=.\)/|a target=new \1${SITE_BASE_URL}/|g" echo -n "
Log:
"
-         cat $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY
+         iconv -c $WEBBUILD_STATEDIR/cache/repository-distromaticlog-$REPOSITORY | tr -d '\000-\011\013\014\016-\037'
          echo -n "
" echo -n "