Skip to content

Webmedium

The Editor Left a Copy

250 points · 0 solved

A developer edited config.php live on the server and their editor dropped a backup next to it. /config.php executes, but /config.php.bak serves source.

$db = new PDO('mysql:host=127.0.0.1', 'root', getenv('DB_PASS'));
// FIXME rotate before launch: flag = "sudo{editors_leave_bak_files}"
$debug = false;

Hints0/2

Learn the technique/learn/web-app-security