Marius Cramer
2013-12-03 5cbbea45538bc460973e2a9fd07a3eed27822a81
interface/web/dns/dns_dkim_get.php
@@ -28,15 +28,15 @@
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
/**
 * This script is invoked by interface/web/dns/templates/dns_dkim_edit.htm
 * when generating the DKIM Private-key.
 *
 * return DKIM Public-Key for the DNS-record
 */
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
//* Check permissions for module
$app->auth->check_module_permissions('dns');
@@ -49,12 +49,12 @@
header('Content-Type: text/xml; charset=utf-8');
header('Cache-Control: must-revalidate, pre-check=0, no-store, no-cache, max-age=0, post-check=0');
/**
 * This function fix PHP's messing up POST input containing characters space, dot,
 * open square bracket and others to be compatible with with the deprecated register_globals
 * @return array POST
 */
function getRealPOST() {
   $pairs = explode("&", file_get_contents("php://input"));
   $vars = array();
@@ -66,7 +66,6 @@
   }
   return $vars;
}
/**
 * This function formats the public-key
@@ -85,7 +84,7 @@
   // Get the parent soa record of the domain
   $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = '".$app->db->quote($_POST['zone'])."' AND ".$app->tform->getAuthSQL('r'));
   $public_key=$app->db->queryOneRecord("SELECT dkim_public FROM mail_domain WHERE domain = '".substr_replace($soa['origin'], '', -1)."' AND ".$app->tform->getAuthSQL('r'));
   $public_key=$app->db->queryOneRecord("SELECT dkim_public FROM mail_domain WHERE domain = '".substr_replace($soa['origin'],'',-1)."' AND dkim = 'Y' AND ".$app->tform->getAuthSQL('r'));
   $public_key=pub_key($public_key);