Skip to content

Commit

Permalink
seems that we forgot about this one in the spring-boot-2 upgrade (Web…
Browse files Browse the repository at this point in the history
  • Loading branch information
zubcevic authored Oct 2, 2019
1 parent 663224d commit fd7fb4c
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import java.util.Map;
Expand All @@ -48,7 +49,8 @@
* @since 3/23/17.
*/
@Slf4j
public class Flag { //extends Endpoint {
@RestController
public class Flag {

public static final Map<Integer, String> FLAGS = Maps.newHashMap();
@Autowired
Expand All @@ -69,12 +71,7 @@ public void initFlags() {
IntStream.range(1, 10).forEach(i -> FLAGS.put(i, UUID.randomUUID().toString()));
}

// @Override
// public String getPath() {
// return "challenge/flag";
// }

@RequestMapping(method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(path="/challenge/flag", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public AttackResult postFlag(@RequestParam String flag) {
UserTracker userTracker = userTrackerRepository.findByUser(webSession.getUserName());
Expand Down

0 comments on commit fd7fb4c

Please sign in to comment.