autodist: fix authenticating social log sent messages by encoding secret

This commit is contained in:
Silvan Calarco 2024-05-02 11:04:32 +02:00
parent 35abe2122a
commit 931dbd1dce

View File

@ -863,10 +863,12 @@ function launch_pkgs_loop() {
[ "$WEBBUILD_URL" -a "$WEBBUILD_USER" ] && { [ "$WEBBUILD_URL" -a "$WEBBUILD_USER" ] && {
SPEC_VERSION=`grep -m1 "^Version:" $spec_dir/$pkg.spec | sed "s|Version:[[:space:]]*||"` SPEC_VERSION=`grep -m1 "^Version:" $spec_dir/$pkg.spec | sed "s|Version:[[:space:]]*||"`
if [ "$WEBBUILD_USER_CMDLINE" ]; then if [ "$WEBBUILD_USER_CMDLINE" ]; then
curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=$WEBBUILD_SECRET&USER_EMAIL=$WEBBUILD_EMAIL&\ curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&\
SECRET=`cgi_encodevar ${WEBBUILD_SECRET}`&USER_EMAIL=$WEBBUILD_EMAIL&\
MESSAGE=`cgi_encodevar \"(invoked by $WEBBUILD_USER_CMDLINE) sent <b>$pkg $SPEC_VERSION-$SPEC_RELEASE</b> for ${TARGETARCH} to <b>$SEND_SERVER</b>\"`" >/dev/null MESSAGE=`cgi_encodevar \"(invoked by $WEBBUILD_USER_CMDLINE) sent <b>$pkg $SPEC_VERSION-$SPEC_RELEASE</b> for ${TARGETARCH} to <b>$SEND_SERVER</b>\"`" >/dev/null
else else
curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&SECRET=$WEBBUILD_SECRET&USER_EMAIL=$WEBBUILD_EMAIL&\ curl -s "$WEBBUILD_URL?REQUEST=message&USER=$WEBBUILD_USER&\
SECRET=`cgi_encodevar ${WEBBUILD_SECRET}`&USER_EMAIL=$WEBBUILD_EMAIL&\
MESSAGE=`cgi_encodevar \"sent <b>$pkg $SPEC_VERSION-$SPEC_RELEASE</b> for ${TARGETARCH} to <b>$SEND_SERVER</b>\"`" >/dev/null MESSAGE=`cgi_encodevar \"sent <b>$pkg $SPEC_VERSION-$SPEC_RELEASE</b> for ${TARGETARCH} to <b>$SEND_SERVER</b>\"`" >/dev/null
fi fi
} }