<?php
/***************************************************************************
- * Copyright (C) 2003-2011 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$mailer->setFrom("webmaster@" . $globals->mail->domain);
$mailer->addTo($globals->core->admin_email);
$mailer->setSubject("[Plat/al Security Alert] $title");
- $mailer->setTxtBody($body . "Identifiants de session :\n" . var_export($_SESSION, true) . "\n\n"
+ // Note: we can't do $session = var_export($_SESSION, true) as var_export
+ // doesn't handle circular dependency correctly.
+ ob_start();
+ var_dump($_SESSION);
+ $session = ob_get_clean();
+ $mailer->setTxtBody($body . "Identifiants de session :\n" . $session . "\n\n"
."Identifiants de connexion :\n" . var_export($_SERVER, true));
$mailer->send();
}
shell_exec('sudo -u root ' . dirname(dirname(__FILE__)) . '/bin/kill_sessions.sh');
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>