Skip to content

Commit f274ea5

Browse files
Fix Sparkle appcast tamper rehearsal
1 parent 996538b commit f274ea5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.github/workflows/preflight.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
exit 1
184184
fi
185185
cp "$feed" "$RUNNER_TEMP/tampered-appcast.xml"
186-
python3 -c 'from pathlib import Path; p=Path("'"$RUNNER_TEMP"'/tampered-appcast.xml"); d=p.read_bytes(); assert b"sparkle:version=" in d; p.write_bytes(d.replace(b"sparkle:version=", b"sparkle:versioX=", 1))'
186+
python3 -c 'from pathlib import Path; p=Path("'"$RUNNER_TEMP"'/tampered-appcast.xml"); d=p.read_bytes(); marker=b"<sparkle:version>"; assert marker in d; p.write_bytes(d.replace(marker, marker+b"0", 1))'
187187
if printf '%s' "$SPARKLE_ED_KEY" | env -u SPARKLE_ED_KEY "$sign_tool" --ed-key-file - --verify "$RUNNER_TEMP/tampered-appcast.xml"; then
188188
echo 'Sparkle accepted a tampered appcast' >&2
189189
exit 1

0 commit comments

Comments
 (0)