The goal is to exploit the concurrency issue which will allow you to purchase merchandise for a lower price. This lab has the same issue as previous lab(Thread Safety Problems),

Step by step Guide

1. From purchase window, enter lowest cost item and then proceed to step of Purchase confirmation. 

Be aware thread safety when considering using Static/Const, Concurrent access to a shared resource can lead to Thread Safety issue. To avoid,  Ensure the access to that resource must be serialized. This can be achieved by using mutex or any higher-level objects such as critical section. 

Below are the source code


private static String currentUser;

private String originalUser;

To fix use:

 static char const*const a[]

In this lab, login from one browser use jeff as username and the other browser login as david, outcome is jeff's login is overwrited by david

Programmers always add comment in source code for reminder, FIXMEs, etc. Release to production without sanitize the code, it will expose webapp or even infrastructure to hackers.

In this example, programmer directly expose the admin user/pass in the source code. Click F12 to open DevTool to find the notes left by developer. 

Please publish modules in offcanvas position.