A little security challenge for PHP developers and security professionals

Challenge

Every once in a while various web security people release XSS competitions to challenge each other. This kind of challenges do not seem to exist for other web security topics. But why leave all the fun to the XSS crowds? Therefore we came up with a PHP challenge that requires advanced PHP security knowledge to be solved correctly.

Do you believe to have what it takes to solve this challenge?

This Challenge is over and you can find the solution over at /blog/15-08-03-php_challenge_2015_solution.html. But you should first try to solve it without our help.