This commit is contained in:
Mario Vavti 2015-12-07 00:01:03 +01:00
commit c8c9916b59
8 changed files with 38 additions and 4 deletions

View file

@ -51,7 +51,7 @@ define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'H'
define ( 'STD_VERSION', '1.0' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1160 );
define ( 'DB_UPDATE_VERSION', 1161 );
/**

View file

@ -495,6 +495,15 @@ function format_css_if_exists($source) {
return '<link rel="stylesheet" href="' . script_path() . '/' . $path . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
}
/*
* This basically calculates the baseurl. We have other functions to do that, but
* there was an issue with script paths and mixed-content whose details are arcane
* and perhaps lost in the message archives. The short answer is that we're ignoring
* the URL which we are "supposed" to use, and generating script paths relative to
* the URL which we are currently using; in order to ensure they are found and aren't
* blocked due to mixed content issues.
*/
function script_path() {
if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS'])
$scheme = 'https';

View file

@ -1611,6 +1611,14 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$channel = $r[0];
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
/* blacklisted channels get a permission denied, no special message to tip them off */
if(! check_channelallowed($sender['hash'])) {
$DR->update('permission denied');
$result[] = $DR->get();
continue;
}
/**
* @FIXME: Somehow we need to block normal message delivery from our clones, as the delivered
* message doesn't have ACL information in it as the cloned copy does. That copy
@ -2082,6 +2090,14 @@ function process_mail_delivery($sender, $arr, $deliveries) {
$channel = $r[0];
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
/* blacklisted channels get a permission denied, no special message to tip them off */
if(! check_channelallowed($sender['hash'])) {
$DR->update('permission denied');
$result[] = $DR->get();
continue;
}
if(! perm_is_allowed($channel['channel_id'],$sender['hash'],'post_mail')) {
logger("permission denied for mail delivery {$channel['channel_id']}");
$DR->update('permission denied');

View file

@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
`abook_profile` char(64) NOT NULL DEFAULT '',
`abook_incl` TEXT NOT NULL DEFAULT '',
`abook_excl` TEXT NOT NULL DEFAULT '',
`abook_instance` TEXT NOT NULL DEFAULT '',
PRIMARY KEY (`abook_id`),
KEY `abook_account` (`abook_account`),
KEY `abook_channel` (`abook_channel`),

View file

@ -22,6 +22,7 @@ CREATE TABLE "abook" (
"abook_profile" char(64) NOT NULL DEFAULT '',
"abook_incl" TEXT NOT NULL DEFAULT '',
"abook_excl" TEXT NOT NULL DEFAULT '',
"abook_instance" TEXT NOT NULL DEFAULT '',
PRIMARY KEY ("abook_id")
);
create index "abook_account" on abook ("abook_account");

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1160 );
define( 'UPDATE_VERSION' , 1161 );
/**
*
@ -1950,3 +1950,10 @@ function update_r1159() {
}
function update_r1160() {
$r = q("alter table abook add abook_instance text not null default '' ");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}

View file

@ -1 +1 @@
2015-12-05.1237
2015-12-06.1238

View file

@ -4,7 +4,7 @@ I'm the web server at {{$sitename}};
The Hubzilla developers released update {{$update}} recently,
but when I tried to install it, something went terribly wrong.
This needs to be fixed soon and it requires human intervention.
Please contact a Red developer if you can not figure out how to
Please contact a project developer if you can not figure out how to
fix it on your own. My database might be invalid.
The error message is '{{$error}}'.