From cf79c8ec5ab22cc501bac92734d7fd9aed717ecb Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 30 Apr 2019 03:49:59 +0000 Subject: [PATCH] Modify smash script to trigger the bug --- contrib/smash | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/contrib/smash b/contrib/smash index 9a743c0..0e958f0 100755 --- a/contrib/smash +++ b/contrib/smash @@ -1,26 +1,16 @@ #! /bin/sh -BASEURL=http://localhost:8080 +## Run two of these to trigger the race condition from -case "$1" in - a) - URL=$BASEURL/answer - ;; - b) - URL=$BASEURL/puzzles.json - ;; - *) - echo "Usage: $0 a|b" 1>&2 - exit 1 - ;; -esac +BASEURL=http://localhost:8080 +URL=$BASEURL/answer while true; do curl \ -X POST \ - -F "cat=base" \ - -F "points=1" \ + -F "cat=byobf" \ + -F "points=10" \ -F "id=test" \ - -F "answer=moo" \ + -F "answer=6" \ $URL done