Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit e8f3b7f8 authored by Mario's avatar Mario

Merge branch '4.4RC'

parents 892e9cd8 e28341ca
Pipeline #157998 passed with stage
in 13 minutes and 11 seconds
# Hubzilla at Home next to your Router
This readme will show you how to install and run Hubzilla or Zap at home.
This readme will show you how to install and run Hubzilla (or Zap) at home.
The installation is done by a script.
What the script will do for you...
+ install everything required by Zap/Hubzilla, basically a web server (Apache), PHP, a database (MySQL), certbot,...
+ install everything required by Hubzilla, basically a web server (Apache), PHP, a database (MySQL), certbot,...
+ create a database
+ run certbot to have everything for a secure connection (httpS)
+ create a script for daily maintenance
- backup to external disk (certificates, database, /var/www/)
- renew certfificate (letsencrypt)
- update of Zap/Hubzilla
- update of Hubzilla
- update of Debian
- restart
+ create cron jobs for
......@@ -23,8 +23,8 @@ What the script will do for you...
The script is known to work without adjustments with
+ Hardware
- Mini-PC with Debian 9 (stretch), or
- Rapberry 3 with Raspbian, Debian 9
- Mini-PC with Debian 10 (stretch), or
- Rapberry 3 with Raspbian, Debian 10
+ DynDNS
- selfHOST.de
- freedns.afraid.org
......@@ -40,7 +40,7 @@ The script can install both [Hubzilla](https://zotlabs.org/page/hubzilla/hubzill
## Disclaimers
- This script does work with Debian 9 only.
- This script does work with Debian 10 only.
- This script has to be used on a fresh debian install only (it does not take account for a possibly already installed and configured webserver or sql implementation).
# Step-by-Step Overwiew
......@@ -55,7 +55,7 @@ Hardware
Software
+ Fresh installation of Debian 9 (Stretch)
+ Fresh installation of Debian 10 (Stretch)
+ Router with open ports 80 and 443 for your web server
## The basic steps (quick overview)
......@@ -136,7 +136,7 @@ The cost is 1,50 € per month (2019).
## Note on Rasperry
The script was tested with an Raspberry 3 under Raspian, Debian 9.
The script was tested with an Raspberry 3 under Raspian, Debian 10.
It is recommended to run the Raspi without graphical frontend (X-Server). Use...
......@@ -146,7 +146,7 @@ to boot the Rapsi to the client console.
DO NOT FORGET TO CHANGE THE DEFAULT PASSWORD FOR USER PI!
On a Raspian Stretch (Debian 9) the validation of the mail address fails for the very first user.
On a Raspian Stretch (Debian 10) the validation of the mail address fails for the very first user.
This used to happen on some *bsd distros but there was some work to fix that a year ago (2017).
So if your system isn't registered in DNS or DNS isn't active do
......
......@@ -26,8 +26,8 @@
# - install
# * apache webserer,
# * php,
# * mysql - the database for hubzilla,
# * phpmyadmin,
# * mariadb - the database for hubzilla,
# * adminer,
# * git to download and update hubzilla addon
# - download hubzilla core and addons
# - configure cron
......@@ -44,11 +44,6 @@
# Security - password is the same for mysql-server, phpmyadmin and hubzilla db
# - The script runs into installation errors for phpmyadmin if it uses
# different passwords. For the sake of simplicity one singel password.
#
# Hubzilla - email verification
# - The script switches off email verification off in all htconfig.tpl.
# Example: /var/www/html/view/en/htconfig.tpl
# - Is this a silly idea or not?
#
# How to restore from backup
# --------------------------
......@@ -73,8 +68,6 @@
# The script is based on Thomas Willinghams script "debian-setup.sh"
# which he used to install the red#matrix.
#
# The script uses another script from https://github.com/lukas2511/letsencrypt.sh
#
# The documentation for bash is here
# https://www.gnu.org/software/bash/manual/bash.html
#
......@@ -94,9 +87,9 @@ function check_sanity {
then
die "Debian is supported only"
fi
if ! grep -q 'Linux 9' /etc/issue
if ! grep -q 'Linux 10' /etc/issue
then
die "Linux 9 (stretch) is supported only"x
die "Linux 10 (buster) is supported only"x
fi
}
......@@ -207,21 +200,17 @@ function print_warn {
}
function stop_hubzilla {
if [ -d /etc/apache2 ]
then
print_info "stopping apache webserver..."
service apache2 stop
fi
if [ -f /etc/init.d/mysql ]
then
print_info "stopping mysql db..."
/etc/init.d/mysql stop
fi
print_info "stopping apache webserver..."
systemctl stop apache2
print_info "stopping mysql db..."
systemctl stop mariadb
}
function install_apache {
print_info "installing apache..."
nocheck_install "apache2 apache2-utils"
a2enmod rewrite
systemctl restart apache2
}
function install_imagemagick {
......@@ -242,78 +231,46 @@ function install_sendmail {
function install_php {
# openssl and mbstring are included in libapache2-mod-php
print_info "installing php..."
nocheck_install "libapache2-mod-php php php-pear php-curl php-mcrypt php-gd php-mysqli php-mbstring php-xml"
sed -i "s/^upload_max_filesize =.*/upload_max_filesize = 100M/g" /etc/php/7.0/apache2/php.ini
sed -i "s/^post_max_size =.*/post_max_size = 100M/g" /etc/php/7.0/apache2/php.ini
nocheck_install "libapache2-mod-php php php-pear php-curl php-gd php-mysqli php-mbstring php-xml php-zip"
sed -i "s/^upload_max_filesize =.*/upload_max_filesize = 100M/g" /etc/php/7.3/apache2/php.ini
sed -i "s/^post_max_size =.*/post_max_size = 100M/g" /etc/php/7.3/apache2/php.ini
}
function install_mysql {
# http://www.microhowto.info/howto/perform_an_unattended_installation_of_a_debian_package.html
#
# To determine the required package name, key and type you can perform
# a trial installation then search the configuration database.
#
# debconf-get-selections | grep mysql-server
#
# The command debconf-get-selections is provided by the package
# debconf-utils, which you may need to install.
#
# apt-get install debconf-utils
#
# If you want to supply an answer to a configuration question but do not
# want to be prompted for it then this can be arranged by preseeding the
# DebConf database with the required information.
#
# echo mysql-server mysql-server/root_password password xyzzy | debconf-set-selections
# echo mysql-server mysql-server/root_password_again password xyzzy | debconf-set-selections
#
print_info "installing mysql..."
if [ -z "$mysqlpass" ]
then
die "mysqlpass not set in $configfile"
fi
echo mysql-server mysql-server/root_password password $mysqlpass | debconf-set-selections
echo mysql-server mysql-server/root_password_again password $mysqlpass | debconf-set-selections
nocheck_install "php-mysql mysql-server mysql-client"
if type mysql ; then
echo "Yes, mysql is installed"
else
echo "mariadb-server"
nocheck_install "mariadb-server"
systemctl status mariadb
systemctl start mariadb
mysql --user=root <<_EOF_
UPDATE mysql.user SET Password=PASSWORD('${db_root_password}') WHERE User='root';
DELETE FROM mysql.user WHERE User='';
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
FLUSH PRIVILEGES;
_EOF_
fi
}
function install_phpmyadmin {
print_info "installing phpmyadmin..."
if [ -z "$phpmyadminpass" ]
function install_adminer {
print_info "installing adminer..."
nocheck_install "adminer"
if [ ! -f /etc/adminer/adminer.conf ]
then
die "phpmyadminpass not set in $configfile"
fi
echo phpmyadmin phpmyadmin/setup-password password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/mysql/app-pass password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/app-password-confirm password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/mysql/admin-pass password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/password-confirm password $phpmyadminpass | debconf-set-selections
echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2 | debconf-set-selections
nocheck_install "phpmyadmin"
# It seems to be not neccessary to check rewrite.load because it comes
# with the installation. To be sure you could check this manually by:
#
# nano /etc/apache2/mods-available/rewrite.load
#
# You should find the content:
#
# LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
a2enmod rewrite
if [ ! -f /etc/apache2/apache2.conf ]
then
die "could not find file /etc/apache2/apache2.conf"
fi
sed -i \
"s/AllowOverride None/AllowOverride all/" \
/etc/apache2/apache2.conf
if [ -z "`grep 'Include /etc/phpmyadmin/apache.conf' /etc/apache2/apache2.conf`" ]
then
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
echo "Alias /adminer /usr/share/adminer/adminer" > /etc/adminer/adminer.conf
ln -s /etc/adminer/adminer.conf /etc/apache2/conf-available/adminer.conf
else
print_info "file /etc/adminer/adminer.conf exists already"
fi
service apache2 restart
/etc/init.d/mysql start
a2enconf adminer
systemctl reload apache2
}
function create_hubzilla_db {
......@@ -330,6 +287,7 @@ function create_hubzilla_db {
then
die "hubzilla_db_pass not set in $configfile"
fi
systemctl restart mariadb
Q1="CREATE DATABASE IF NOT EXISTS $hubzilla_db_name;"
Q2="GRANT USAGE ON *.* TO $hubzilla_db_user@localhost IDENTIFIED BY '$hubzilla_db_pass';"
Q3="GRANT ALL PRIVILEGES ON $hubzilla_db_name.* to $hubzilla_db_user@localhost identified by '$hubzilla_db_pass';"
......@@ -454,17 +412,7 @@ function install_letsencrypt {
then
die "Failed to install let's encrypt: 'le_domain' is empty in $configfile"
fi
nocheck_install "apt-transport-https"
# add backports to your sources.list
backports_list=/etc/apt/sources.list.d/backports.list
if [ -f $backports_list ]
then
print_info "$backports_list exist already"
else
echo "deb https://deb.debian.org/debian stretch-backports main" > $backports_list
fi
apt-get -y update
DEBIAN_FRONTEND=noninteractive apt-get -q -y -t stretch-backports install certbot python-certbot-apache
nocheck_install "certbot python-certbot-apache"
print_info "run certbot ..."
certbot --apache -w /var/www/html -d $le_domain -m $le_email --agree-tos --non-interactive --redirect --hsts --uir
service apache2 restart
......@@ -486,9 +434,9 @@ function install_hubzilla {
print_info "installing hubzilla addons..."
cd /var/www/html/
# if you install Hubzilla
util/add_addon_repo https://framagit.org/hubzilla/addons hzaddons
# util/add_addon_repo https://framagit.org/hubzilla/addons hzaddons
# if you install ZAP
#util/add_addon_repo https://framagit.org/zot/zap-addons.git zaddons
util/add_addon_repo https://framagit.org/zot/zap-addons.git zaddons
mkdir -p "store/[data]/smarty3"
chmod -R 777 store
touch .htconfig.php
......@@ -498,12 +446,6 @@ function install_hubzilla {
chown root:www-data /var/www/html/
chown root:www-data /var/www/html/.htaccess
chmod 0644 /var/www/html/.htaccess
print_info "try to switch off email registration..."
sed -i "s/verify_email.*1/verify_email'] = 0/" /var/www/html/view/*/ht*
if [ -n "`grep -r 'verify_email.*1' /var/www/html/view/`" ]
then
print_warn "Hubzillas registration prozess might have email verification switched on."
fi
print_info "installed hubzilla"
}
......@@ -635,7 +577,6 @@ source $configfile
selfhostdir=/etc/selfhost
selfhostscript=selfhost-updater.sh
hubzilladaily=hubzilla-daily.sh
plugins_update=.homeinstall/plugins_update.sh
backup_mount_point=/media/hubzilla_backup
#set -x # activate debugging from here
......@@ -649,7 +590,7 @@ install_apache
install_imagemagick
install_php
install_mysql
install_phpmyadmin
install_adminer
create_hubzilla_db
run_freedns
install_run_selfhost
......
Hubzilla 4.4 (2019-08-13)
- Change primary directory from zotadel.net to hub.netzgemeinde.eu (requested by zotadel admin)
- Add Russian context help files
- Replace plink URL with share tag if possible
- Catch and exclude trailing punctuation while URL embedding
- Do not limit channel if service class property value is set to zero
- Streamline keyId and creator/actor
- Add daemon_master_summon hook
- Serve static files directly if not caught by web server
- Update cacert.pem
- Calendar: allow different date/time format inputs
- Calendar: hide timezone select for allday events
⁻ Add opengraph meta info to channel page
- Begin directory migration to zot6
- Support zot and zot6 in social graph operations
- Lowlevel support for zot6 direct messages
- Consolidate HTTP signatures
- Allow api login by address or url
- Provide auto redirect from zot6 /item permalinks
- Export all items except photos in channel_export_items_date()
- Calendar: clicking a day or week number will now open the day or week view
- Remove cached photo location directory on delete if empty
- Include zot6 hubs in the Grid scope
- Fix os_path replace for thumbnails
- Avoid to process original images using storeThumbnail()
Bugfixes
- Fix URLs on imported item taxonomy
- Fix admin not allowed to delete any item
- Fix webfiunger issue with URLs containing an @
- Fix missing object in emoji reactions
- Fix appschema to include diaspora:guid
- Fix zotfinger in update_directory_entry()
- Fix incorrect media type on links for photo objects
- Fix mid not dbesc'd in item_store()
- Fix calendar encoding issues
Addons
- twitter: various rendering improvements
- cavatar: fix wrong image mimetype
- gravatar: fix wrong image mimetype
- Add license file
- pubcrawl: make repeats render like wall to wall posts
- pubcrawl: fix pubcrawl_import_author() sometimes returning a non activitypub xchan
- pubcrawl: use Lib/Activity for taxonomy en/decoding
- pubcrawl: fix wrong uuid in like activity
- pubcrawl: fix issue with encoding hashtags
- openstreetmap: use https URLs by default
- queueworker: refactor and efficiency improvements
- pubcrawl: use unique IDs for follow and accept activities
- pubcrawl: implement thread completion
- pubcrawl: implement delete activity
- photocache: reduce the size of the photo cache subdirectories tree
- photocache: use html_entity_decode() for cached photo URL
- diaspora: fix possible issue with diaspora relay not initializing
Hubzilla 4.2.1 (2019-06-17)
- Deprecate mod events
- Revisit mod cal
......
Copyright (c) 2010-2018 the Hubzilla Community
Copyright (c) 2019 Hubzilla Community
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
......@@ -8,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -108,6 +108,7 @@ class Cron {
$file = dbunescbin($rr['content']);
if(is_file($file)) {
@unlink($file);
@rmdir(dirname($file));
logger('info: deleted cached photo file ' . $file, LOGGER_DEBUG);
}
}
......@@ -187,7 +188,7 @@ class Cron {
if($r) {
require_once('include/photo/photo_driver.php');
foreach($r as $rr) {
$photos = import_xchan_photo($rr['xchan_photo_l'],$rr['xchan_hash']);
$photos = import_xchan_photo($rr['xchan_photo_l'], $rr['xchan_hash'], false, true);
$x = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s'
where xchan_hash = '%s'",
dbesc($photos[0]),
......
......@@ -17,7 +17,22 @@ if(array_search( __file__ , get_included_files()) === 0) {
class Master {
static public function Summon($arr) {
proc_run('php','Zotlabs/Daemon/Master.php',$arr);
$hookinfo = [
'argv'=>$arr
];
call_hooks ('daemon_master_summon',$hookinfo);
$arr = $hookinfo['argv'];
$argc = count($arr);
if ((!is_array($arr) || (count($arr) < 1))) {
logger("Summon handled by hook.",LOGGER_DEBUG);
return;
}
$phpbin = get_config('system','phpbin','php');
proc_run($phpbin,'Zotlabs/Daemon/Master.php',$arr);
}
static public function Release($argc,$argv) {
......@@ -33,6 +48,7 @@ class Master {
$argc = count($argv);
if ((!is_array($argv) || (count($argv) < 1))) {
logger("Release handled by hook.",LOGGER_DEBUG);
return;
}
......
This diff is collapsed.
......@@ -807,6 +807,11 @@ class Enotify {
$itemem_text = (($item['item_thread_top'])
? t('created a new post')
: sprintf( t('commented on %s\'s post'), $item['owner']['xchan_name']));
if($item['verb'] === ACTIVITY_SHARE) {
$itemem_text = sprintf( t('repeated %s\'s post'), $item['author']['xchan_name']);
}
}
$edit = false;
......@@ -825,12 +830,14 @@ class Enotify {
// convert this logic into a json array just like the system notifications
$who = (($item['verb'] === ACTIVITY_SHARE) ? 'owner' : 'author');
$x = array(
'notify_link' => $item['llink'],
'name' => $item['author']['xchan_name'],
'addr' => (($item['author']['xchan_addr']) ? $item['author']['xchan_addr'] : $item['author']['xchan_url']),
'url' => $item['author']['xchan_url'],
'photo' => $item['author']['xchan_photo_s'],
'name' => $item[$who]['xchan_name'],
'addr' => (($item[$who]['xchan_addr']) ? $item[$who]['xchan_addr'] : $item[$who]['xchan_url']),
'url' => $item[$who]['xchan_url'],
'photo' => $item[$who]['xchan_photo_s'],
'when' => relative_date(($edit)? $item['edited'] : $item['created']),
'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'),
'b64mid' => ((in_array($item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? 'b64.' . base64url_encode($item['thr_parent']) : 'b64.' . base64url_encode($item['mid'])),
......@@ -838,7 +845,7 @@ class Enotify {
'thread_top' => (($item['item_thread_top']) ? true : false),
'message' => strip_tags(bbcode($itemem_text)),
// these are for the superblock addon
'hash' => $item['author']['xchan_hash'],
'hash' => $item[$who]['xchan_hash'],
'uid' => local_channel(),
'display' => true
);
......
......@@ -2,7 +2,7 @@
namespace Zotlabs\Lib;
use Zotlabs\Zot6\HTTPSig;
use Zotlabs\Web\HTTPSig;
class JSalmon {
......
......@@ -29,7 +29,7 @@ class LDSignatures {
$options = [
'type' => 'RsaSignature2017',
'nonce' => random_string(64),
'creator' => z_root() . '/channel/' . $channel['channel_address'] . '/public_key_pem',
'creator' => z_root() . '/channel/' . $channel['channel_address'],
'created' => datetime_convert('UTC','UTC', 'now', 'Y-m-d\Th:i:s\Z')
];
......@@ -124,7 +124,7 @@ class LDSignatures {
'meDataType' => $data_type,
'meEncoding' => $encoding,
'meAlgorithm' => $algorithm,
'meCreator' => z_root() . '/channel/' . $channel['channel_address'] . '/public_key_pem',
'meCreator' => z_root() . '/channel/' . $channel['channel_address'],
'meSignatureValue' => $signature
]);
......@@ -132,4 +132,4 @@ class LDSignatures {
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@
namespace Zotlabs\Lib;
use Zotlabs\Zot6\HTTPSig;
use Zotlabs\Web\HTTPSig;
use Zotlabs\Access\Permissions;
use Zotlabs\Access\PermissionLimits;
use Zotlabs\Daemon\Master;
......
......@@ -98,7 +98,7 @@ class ThreadItem {
$conv = $this->get_conversation();
$observer = $conv->get_observer();
$lock = ((($item['item_private'] == 1) || (($item['uid'] == local_channel()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
$lock = (((intval($item['item_private'])) || (($item['uid'] == local_channel()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
......@@ -110,7 +110,7 @@ class ThreadItem {
$shareable = true;
$privacy_warning = false;
if(($item['item_private'] == 1) && ($item['owner']['xchan_network'] === 'activitypub')) {
if(intval($item['item_private']) && ($item['owner']['xchan_network'] === 'activitypub')) {
$recips = get_iconfig($item['parent'], 'activitypub', 'recips');
if(! in_array($observer['xchan_url'], $recips['to']))
......
......@@ -2,7 +2,7 @@
namespace Zotlabs\Lib;
use Zotlabs\Zot6\HTTPSig;
use Zotlabs\Web\HTTPSig;
class ZotURL {
......
......@@ -2,7 +2,7 @@
namespace Zotlabs\Lib;
use Zotlabs\Zot6\HTTPSig;
use Zotlabs\Web\HTTPSig;
class Zotfinger {
......
......@@ -28,7 +28,8 @@ class Apschema extends \Zotlabs\Web\Controller {
'nomadicHubs' => 'zot:nomadicHubs',
'emojiReaction' => 'zot:emojiReaction',
'expires' => 'zot:expires',
'directMessage' => 'zot:directMessage',
'magicEnv' => [
'@id' => 'zot:magicEnv',
'@type' => '@id'
......@@ -40,8 +41,13 @@ class Apschema extends \Zotlabs\Web\Controller {
],
'ostatus' => 'http://ostatus.org#',
'conversation' => 'ostatus:conversation'
'conversation' => 'ostatus:conversation',
'diaspora' => 'https://diasporafoundation.org/ns/',
'guid' => 'diaspora:guid',
'Hashtag' => 'as:Hashtag'
]
];
......@@ -54,4 +60,4 @@ class Apschema extends \Zotlabs\Web\Controller {
}
\ No newline at end of file
}
......@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Apps;
use Zotlabs\Web\Controller;
use Zotlabs\Web\HTTPSig;
require_once('include/event.php');
......@@ -41,7 +42,7 @@ class Cdav extends Controller {
continue;
}
$sigblock = \Zotlabs\Web\HTTPSig::parse_sigheader($_SERVER[$head]);
$sigblock = HTTPSig::parse_sigheader($_SERVER[$head]);
if($sigblock) {
$keyId = str_replace('acct:','',$sigblock['keyId']);
if($keyId) {
......@@ -64,7 +65,7 @@ class Cdav extends Controller {
continue;
if($record) {
$verified = \Zotlabs\Web\HTTPSig::verify('',$record['channel']['channel_pubkey']);
$verified = HTTPSig::verify('',$record['channel']['channel_pubkey']);
if(! ($verified && $verified['header_signed'] && $verified['header_valid'])) {
$record = null;
}
......@@ -277,11 +278,11 @@ class Cdav extends Controller {
$allday = $_REQUEST['allday'];
$title = $_REQUEST['title'];
$start = datetime_convert($tz, 'UTC', $_REQUEST['dtstart']);
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert($tz, 'UTC', $_REQUEST['dtend']);
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$description = $_REQUEST['description'];
......@@ -368,10 +369,10 @@ class Cdav extends Controller {
$uri = $_REQUEST['uri'];
$title = $_REQUEST['title'];
$start = datetime_convert($tz, 'UTC', $_REQUEST['dtstart']);
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert($tz, 'UTC', $_REQUEST['dtend']);
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$description = $_REQUEST['description'];
......@@ -441,10 +442,10 @@ class Cdav extends Controller {
$allday = $_REQUEST['allday'];
$uri = $_REQUEST['uri'];
$start = datetime_convert($tz, 'UTC', $_REQUEST['dtstart']);
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert($tz, 'UTC', $_REQUEST['dtend']);
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
......
......@@ -6,7 +6,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\PermissionDescription;
use Zotlabs\Zot6\HTTPSig;
use Zotlabs\Web\HTTPSig;
use Zotlabs\Lib\Libzot;
require_once('include/items.php');
......@@ -111,6 +111,17 @@ class Channel extends Controller {
// we start loading content
profile_load($which,$profile);
App::$page['htmlhead'] .= '<meta property="og:title" content="' . htmlspecialchars($channel['channel_name']) . '">' . "\r\n";
App::$page['htmlhead'] .= '<meta property="og:image" content="' . $channel['xchan_photo_l'] . '">' . "\r\n";
if(App::$profile['about'] && perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_profile')) {
App::$page['htmlhead'] .= '<meta property="og:description" content="' . htmlspecialchars(App::$profile['about']) . '">' . "\r\n";
}
else {
App::$page['htmlhead'] .= '<meta property="og:description" content="' . htmlspecialchars(sprintf( t('This is the home page of %s.'), $channel['channel_name'])) . '">' . "\r\n";
}
}
function get($update = 0, $load = false) {
......
......@@ -21,7 +21,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
$event_hash = ((x($_POST,'event_hash')) ? $_POST['event_hash'] : '');
$xchan = ((x($_POST,'xchan')) ? dbesc($_POST['xchan']) : '');
$uid = local_channel();
$uid = local_channel();
// only allow editing your own events.
if(($xchan) && ($xchan !== get_observer_hash()))
......@@ -34,8 +34,8 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
$adjust = intval($_POST['adjust']);
$start = (($adjust) ? datetime_convert($tz, 'UTC', escape_tags($_REQUEST['dtstart'])) : datetime_convert('UTC', 'UTC', escape_tags($_REQUEST['dtstart'])));
$finish = (($adjust) ? datetime_convert($tz, 'UTC', escape_tags($_REQUEST['dtend'])) : datetime_convert('UTC', 'UTC', escape_tags($_REQUEST['dtend'])));
$start = datetime_convert('UTC', 'UTC', escape_tags($_REQUEST['dtstart']));
$finish = datetime_convert('UTC', 'UTC', escape_tags($_REQUEST['dtend']));
$summary = escape_tags(trim($_POST['summary']));
$desc = escape_tags(trim($_POST['desc']));
......
......@@ -8,8 +8,9 @@
namespace Zotlabs\Module;
use \Sabre\DAV as SDAV;
use \Zotlabs\Storage;
use Sabre\DAV as SDAV;