require SSL

This commit is contained in:
systopia 2015-03-27 13:21:15 +01:00
parent 9d6e05e480
commit 9d54288ee0
1 changed files with 5 additions and 0 deletions

View File

@ -123,6 +123,11 @@ function civiproxy_mend_URLs(&$string) {
* @return TRUE if allowed, FALSE if not (or quits if $quit is set) * @return TRUE if allowed, FALSE if not (or quits if $quit is set)
*/ */
function civiproxy_security_check($target, $quit=TRUE) { function civiproxy_security_check($target, $quit=TRUE) {
// verify that we're SSL encrypted
if ($_SERVER['HTTPS'] != "on") {
civiproxy_http_error("This CiviProxy installation requires SSL encryption.", 400);
}
global $debug; global $debug;
if (!empty($debug)) { if (!empty($debug)) {
$file = fopen($debug, 'a'); $file = fopen($debug, 'a');