> For the complete documentation index, see [llms.txt](https://shadowforge.gitbook.io/shadowforge-writeups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shadowforge.gitbook.io/shadowforge-writeups/bugforge.io/readme.txt/daily-labs/broken-logic/cheesy-does-it-2.md).

# Cheesy Does It

> Today's hint was ***Can you apply the discount multiple times?*** Guess I'm getting a free pizza again!

So when I opened up the app, I immediately saw the "today's only" discount code. In combination with the hint, I knew I had to play around with this.

### Race Condition

For some reason my brain wasn't braining, and I thought a race condition might be the answer. So I tried that and ended up with 20 reasonably priced pizza's 🍕

<figure><img src="/files/F11p9XrDimF1l8I4YvlY" alt=""><figcaption></figcaption></figure>

Not really what I was going for

### Different discount code

Then I tried simply tried using the discount code `pizza-20` or `pizza-100` instead of `pizza-10` , only to end up with a lot of pizza's that didn't had a discount code.

### Multiple inputs

I tried adding the same `discount` field inside the JSON object multiple times, but that didn't work either.

<figure><img src="/files/Efdx6OmwLB4w9ryju51f" alt=""><figcaption></figcaption></figure>

Looking carefully at this request, I saw that the `toppings` was constructed with an array. So I tried to do the same with the discount.

<figure><img src="/files/zYkzz5Sqg2j9KdngwPAo" alt=""><figcaption></figcaption></figure>

And that did the trick! Got my major discount on my <sub>31st</sub> 🤫 pizza, and the flag 🇧🇪
