Viewing file: init.inc.php (2.68 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
############################################################################
# DWmail
# - version 4.0.4
# - Copyright (c) 2003-2006 Dominion Web Design
# - http://www.dominion-web.com/products/dwmail/
############################################################################
#
# The contents of this file are subject to the DWmail License version
# 2.2 ('License'). You may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.dominion-web.com/products/dwmail/license.php
# Software distributed under the License is distributed on an "AS IS" basis,
# without warranty of any kind, either express or implied.
#
# This code is Copyright (c) 2003-2006 Dominion Web Design.
# All rights reserved.
#
# This software may not be redistributed outside the terms of the
# license agreement.
#
############################################################################
*/
error_reporting(E_ALL ^ E_NOTICE);
// #############################################################################
// Check for PHP globals bug
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
echo 'GLOBALS variable tainting attempted';
exit;
}
// #############################################################################
// Check for POST forms are form current host
// If you intent to POST form request from OTHER hosts than the one DWmail is
// installed on you should comment out the following IF statement
if (strtoupper ($_SERVER['REQUEST_METHOD']) == 'POST') {
if ($_SERVER['HTTP_HOST'] || $_ENV['HTTP_HOST']) {
$httpserver = ($_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_ENV['HTTP_HOST']);
}
else if ($_SERVER['SERVER_NAME'] || $_ENV['SERVER_NAME']) {
$httpserver = ($_SERVER['SERVER_NAME'] ? $_SERVER['SERVER_NAME'] : $_ENV['SERVER_NAME']);
}
if ($httpserver && $_SERVER['HTTP_REFERER']) {
$referrer = parse_url($_SERVER['HTTP_REFERER']);
$httpserver = preg_replace('#^www\.#i', '', $httpserver);
$currenthost = preg_quote($httpserver . !empty($referrer['port']) ? $httpserver . ":$referrer[port]" : '', '#');
$referringhost = $referrer['host'] . !empty($referrer['port']) ? $referrer['host'] . ":$referrer[port]" : '';
if (!preg_match('#' . $currenthost . '$#siU', $referringhost)) {
die ("This form was not submitted from the same host as webmail is installed on");
}
}
}
$type = array("text", "multipart", "message", "application", "audio", "image", "video", "other");
$encoding = array("7bit", "8bit", "binary", "base64", "quoted-printable", "other");
// ############ SOFTWARE VERSION ############
// Software version - Do not edit
$version = "4.0.4";
?>
|