Files
archived-web-master/fetch/cvsforwarding.php
Nikita Popov 3f5dc40db4 Use db_query_safe() in more places
Replace most of the raw mysql_query() calls.
2021-04-01 15:09:01 +02:00

21 lines
747 B
PHP

<?php
require_once __DIR__ . '/../include/functions.inc';
# token required, since this should only get accessed from php.net mx
if (!isset($_REQUEST['token']) || md5($_REQUEST['token']) != "19a3ec370affe2d899755f005e5cd90e")
die("token not correct.");
// Connect and generate the list from the DB
db_connect();
$res = db_query_safe("SELECT username,email,spamprotect FROM users WHERE email != '' AND cvsaccess");
if ($res) {
while ($row = @mysql_fetch_array($res)) {
echo "$row[username]@php.net: ",
($row['spamprotect'] ? "|/local/bin/automoderate," : ""),
"$row[email];\n";
echo "$row[username]@pair2.php.net: ",
($row['spamprotect'] ? "|/local/bin/automoderate," : ""),
"$row[email];\n";
}
}