Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
b89d2d7580
128
CHANGELOG
128
CHANGELOG
@ -1,3 +1,131 @@
|
||||
Hubzilla 4.4 (2019-08-??)
|
||||
- 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
|
||||
- Fix issues with deletion of linked items and resources
|
||||
- Fix zot6 delete issue
|
||||
- Fix attach sync issue
|
||||
- Remove sizeRangeSuffixes in justified gallery wrapper
|
||||
- Fix storageconv issue with postgres
|
||||
- Fix embedphotos image size
|
||||
- pubcrawl: use URI instead of object for actor url
|
||||
- diaspora: adjust loglevel
|
||||
- gallery: remove workaround for margin issue which has been fixed upstream
|
||||
- cart: warn about unsaved changes
|
||||
|
||||
|
||||
Hubzilla 4.2 (2019-06-04)
|
||||
- Introduce Calendar app which deprecates Events and CalDAV apps and streamlines the featuresets
|
||||
- Update mod cal to reflect changes in the calendar app
|
||||
- Improve timezone detection for CalDAV calendars
|
||||
- Add mention support to event description in channel calendar
|
||||
- Update jgrowl library
|
||||
- Do not try to oembed URLs without embed tags
|
||||
- Optimise pdf oembed processing
|
||||
- Add form security token to mod register
|
||||
- Replace URLs for mod gallery, mod photos and mod photo on cloned channel post sync
|
||||
- Update justified gallery library
|
||||
- Update bootstrap libraries
|
||||
- Use "cache" flag for bbcode() on content destined for zot6
|
||||
- Improve DB indexing
|
||||
- Drop deprecated columns from channel the table
|
||||
- Replace own image URL in clonned channel posts
|
||||
- Improve DB update handling
|
||||
- Improve item deletion when a contact was removed
|
||||
- Zot6 compatibility for emoji reactions
|
||||
- Add threaded comments support (disabled by default)
|
||||
- Improve xmlify()/unxmlify() performance
|
||||
- Update blueimp/jquery-file-uplad library
|
||||
- Update sabre/vobject library
|
||||
- Various doco updates
|
||||
- Implement remove profile photo button (reset to default photo)
|
||||
- Implement remove cover photo button
|
||||
- Update the homeinstall script
|
||||
- Add command line tool for photo thumbnails storage conversion
|
||||
- Implement option to store photo thumbnails in filesystem instead of DB
|
||||
|
||||
Bugfixes
|
||||
- Fix category widget when using articles
|
||||
- Fix live update not triggering in mod search
|
||||
- Fix encoded URLs in code blocks
|
||||
- Fix wiki headers not escaped
|
||||
- Fix possible xchan protocol confusion in new_contact()
|
||||
- Fix xchan_url not displayed if xchan_addr not available
|
||||
- Fix suggestion ordering in mod directory
|
||||
- Fix event attachment delivery to zot6
|
||||
|
||||
Addons
|
||||
- pubcrawl: improve friendica compatibility by adding the nonstandard diaspora:guid field
|
||||
- pubcrawl: initial suport for events
|
||||
- pubcrawl: improve permalink detection
|
||||
- flashcards: fix moving learn buttons if viewport sizes changes
|
||||
- flashcards: Move card details to the bottom of a card
|
||||
- upgrade_info: provide links to changelog
|
||||
- photocache: do not save filename for cached photos
|
||||
- pubcrawl: save local comment activitypub payload in iconfig to be used for relay
|
||||
- flashcards: UI improvements in box settings
|
||||
- pubcrawl: implement profile update messages
|
||||
- pubcrawl: use URI instead of object for actor
|
||||
- flashcards: fix jumping sync button
|
||||
- pubcrawl: add threaded comments support
|
||||
- pubcrawl: ignore target encoding errors
|
||||
- pubcrawl: format photo items for activitypub
|
||||
|
||||
|
||||
Hubzilla 4.0.3 (2019-04-26)
|
||||
- Add attachments to zot6 event objects
|
||||
- Add zot6 to federated transports
|
||||
|
11
LICENSE
11
LICENSE
@ -1,4 +1,5 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,9 @@
|
||||
namespace Zotlabs\Lib;
|
||||
|
||||
use Zotlabs\Daemon\Master;
|
||||
use Zotlabs\Zot6\HTTPSig;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
require_once('include/event.php');
|
||||
|
||||
class Activity {
|
||||
|
||||
@ -73,7 +75,7 @@ class Activity {
|
||||
|
||||
if($x['success']) {
|
||||
$y = json_decode($x['body'],true);
|
||||
logger('returned: ' . json_encode($y,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES));
|
||||
logger('returned: ' . json_encode($y,JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES), LOGGER_DEBUG);
|
||||
return json_decode($x['body'], true);
|
||||
}
|
||||
else {
|
||||
@ -149,7 +151,6 @@ class Activity {
|
||||
|
||||
static function fetch_image($x) {
|
||||
|
||||
|
||||
$ret = [
|
||||
'type' => 'Image',
|
||||
'id' => $x['id'],
|
||||
@ -292,8 +293,12 @@ class Activity {
|
||||
$ret['published'] = datetime_convert('UTC','UTC',$i['created'],ATOM_TIME);
|
||||
if($i['created'] !== $i['edited'])
|
||||
$ret['updated'] = datetime_convert('UTC','UTC',$i['edited'],ATOM_TIME);
|
||||
if ($i['expires'] <= NULL_DATE) {
|
||||
$ret['expires'] = datetime_convert('UTC','UTC',$i['expires'],ATOM_TIME);
|
||||
}
|
||||
|
||||
if($i['app']) {
|
||||
$ret['instrument'] = [ 'type' => 'Service', 'name' => $i['app'] ];
|
||||
$ret['generator'] = [ 'type' => 'Application', 'name' => $i['app'] ];
|
||||
}
|
||||
if($i['location'] || $i['coord']) {
|
||||
$ret['location'] = [ 'type' => 'Place' ];
|
||||
@ -307,6 +312,10 @@ class Activity {
|
||||
}
|
||||
}
|
||||
|
||||
if (intval($i['item_private']) === 2) {
|
||||
$ret['directMessage'] = true;
|
||||
}
|
||||
|
||||
$ret['attributedTo'] = $i['author']['xchan_url'];
|
||||
|
||||
if($i['id'] != $i['parent']) {
|
||||
@ -352,7 +361,7 @@ class Activity {
|
||||
|
||||
switch($t['type']) {
|
||||
case 'Hashtag':
|
||||
$ret[] = [ 'ttype' => TERM_HASHTAG, 'url' => $t['href'], 'term' => escape_tags((substr($t['name'],0,1) === '#') ? substr($t['name'],1) : $t['name']) ];
|
||||
$ret[] = [ 'ttype' => TERM_HASHTAG, 'url' => ((isset($t['href'])) ? $t['href'] : $t['id']), 'term' => escape_tags((substr($t['name'],0,1) === '#') ? substr($t['name'],1) : $t['name']) ];
|
||||
break;
|
||||
|
||||
case 'Mention':
|
||||
@ -383,9 +392,9 @@ class Activity {
|
||||
foreach($item['term'] as $t) {
|
||||
switch($t['ttype']) {
|
||||
case TERM_HASHTAG:
|
||||
// An id is required so if we don't have a url in the taxonomy, ignore it and keep going.
|
||||
// href is required so if we don't have a url in the taxonomy, ignore it and keep going.
|
||||
if($t['url']) {
|
||||
$ret[] = [ 'id' => $t['url'], 'name' => '#' . $t['term'] ];
|
||||
$ret[] = [ 'type' => 'Hashtag', 'href' => $t['url'], 'name' => '#' . $t['term'] ];
|
||||
}
|
||||
break;
|
||||
|
||||
@ -470,8 +479,27 @@ class Activity {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
if($i['verb'] === ACTIVITY_FRIEND) {
|
||||
// Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
|
||||
$ret['obj_type'] = ACTIVITY_OBJ_NOTE;
|
||||
$ret['obj'] = [];
|
||||
}
|
||||
|
||||
$ret['type'] = self::activity_mapper($i['verb']);
|
||||
|
||||
if($ret['type'] === 'emojiReaction') {
|
||||
// There may not be an object for these items for legacy reasons - it should be the conversation parent.
|
||||
$p = q("select * from item where mid = '%s' and uid = %d",
|
||||
dbesc($i['parent_mid']),
|
||||
intval($i['uid'])
|
||||
);
|
||||
if($p) {
|
||||
xchan_query($p,true);
|
||||
$p = fetch_post_tags($p,true);
|
||||
$i['obj'] = self::encode_item($p[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ret['id'] = ((strpos($i['mid'],'http') === 0) ? $i['mid'] : z_root() . '/activity/' . urlencode($i['mid']));
|
||||
|
||||
@ -494,7 +522,7 @@ class Activity {
|
||||
if($i['created'] !== $i['edited'])
|
||||
$ret['updated'] = datetime_convert('UTC','UTC',$i['edited'],ATOM_TIME);
|
||||
if($i['app']) {
|
||||
$ret['instrument'] = [ 'type' => 'Service', 'name' => $i['app'] ];
|
||||
$ret['generator'] = [ 'type' => 'Application', 'name' => $i['app'] ];
|
||||
}
|
||||
if($i['location'] || $i['coord']) {
|
||||
$ret['location'] = [ 'type' => 'Place' ];
|
||||
@ -1301,6 +1329,12 @@ class Activity {
|
||||
elseif($act->obj['updated']) {
|
||||
$s['edited'] = datetime_convert('UTC','UTC',$act->obj['updated']);
|
||||
}
|
||||
if ($act->data['expires']) {
|
||||
$s['expires'] = datetime_convert('UTC','UTC',$act->data['expires']);
|
||||
}
|
||||
elseif ($act->obj['expires']) {
|
||||
$s['expires'] = datetime_convert('UTC','UTC',$act->obj['expires']);
|
||||
}
|
||||
|
||||
if(! $s['created'])
|
||||
$s['created'] = datetime_convert();
|
||||
@ -1319,13 +1353,13 @@ class Activity {
|
||||
$s['verb'] = ACTIVITY_POST;
|
||||
$s['obj_type'] = ACTIVITY_OBJ_NOTE;
|
||||
|
||||
$instrument = $act->get_property_obj('instrument');
|
||||
if(! $instrument)
|
||||
$instrument = $act->get_property_obj('instrument',$act->obj);
|
||||
$generator = $act->get_property_obj('generator');
|
||||
if(! $generator)
|
||||
$generator = $act->get_property_obj('generator',$act->obj);
|
||||
|
||||
if($instrument && array_key_exists('type',$instrument)
|
||||
&& $instrument['type'] === 'Service' && array_key_exists('name',$instrument)) {
|
||||
$s['app'] = escape_tags($instrument['name']);
|
||||
if($generator && array_key_exists('type',$generator)
|
||||
&& in_array($generator['type'], [ 'Application','Service' ] ) && array_key_exists('name',$generator)) {
|
||||
$s['app'] = escape_tags($generator['name']);
|
||||
}
|
||||
|
||||
if($channel['channel_system']) {
|
||||
@ -1398,6 +1432,11 @@ class Activity {
|
||||
if($act->recips && (! in_array(ACTIVITY_PUBLIC_INBOX,$act->recips)))
|
||||
$s['item_private'] = 1;
|
||||
|
||||
|
||||
if (array_key_exists('directMessage',$act->obj) && intval($act->obj['directMessage'])) {
|
||||
$s['item_private'] = 2;
|
||||
}
|
||||
|
||||
set_iconfig($s,'activitypub','recips',$act->raw_recips);
|
||||
if($parent) {
|
||||
set_iconfig($s,'activitypub','rawmsg',$act->raw,1);
|
||||
@ -1485,6 +1524,12 @@ class Activity {
|
||||
elseif($act->obj['updated']) {
|
||||
$s['edited'] = datetime_convert('UTC','UTC',$act->obj['updated']);
|
||||
}
|
||||
if ($act->data['expires']) {
|
||||
$s['expires'] = datetime_convert('UTC','UTC',$act->data['expires']);
|
||||
}
|
||||
elseif ($act->obj['expires']) {
|
||||
$s['expires'] = datetime_convert('UTC','UTC',$act->obj['expires']);
|
||||
}
|
||||
|
||||
|
||||
if(in_array($act->type, [ 'Like', 'Dislike', 'Flag', 'Block', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'emojiReaction' ])) {
|
||||
@ -1546,7 +1591,7 @@ class Activity {
|
||||
$s['verb'] = self::activity_decode_mapper($act->type);
|
||||
|
||||
|
||||
if($act->type === 'Tombstone' || ($act->type === 'Create' && $act->obj['type'] === 'Tombstone')) {
|
||||
if($act->type === 'Tombstone' || $act->type === 'Delete' || ($act->type === 'Create' && $act->obj['type'] === 'Tombstone')) {
|
||||
$s['item_deleted'] = 1;
|
||||
}
|
||||
|
||||
@ -1582,14 +1627,14 @@ class Activity {
|
||||
$s['obj'] = $act->obj;
|
||||
}
|
||||
|
||||
$instrument = $act->get_property_obj('instrument');
|
||||
if((! $instrument) && (! $response_activity)) {
|
||||
$instrument = $act->get_property_obj('instrument',$act->obj);
|
||||
$generator = $act->get_property_obj('generator');
|
||||
if((! $generator) && (! $response_activity)) {
|
||||
$generator = $act->get_property_obj('generator',$act->obj);
|
||||
}
|
||||
|
||||
if($instrument && array_key_exists('type',$instrument)
|
||||
&& $instrument['type'] === 'Service' && array_key_exists('name',$instrument)) {
|
||||
$s['app'] = escape_tags($instrument['name']);
|
||||
if($generator && array_key_exists('type',$generator)
|
||||
&& in_array($generator['type'], [ 'Application', 'Service' ] ) && array_key_exists('name',$generator)) {
|
||||
$s['app'] = escape_tags($generator['name']);
|
||||
}
|
||||
|
||||
|
||||
@ -1724,14 +1769,14 @@ class Activity {
|
||||
}
|
||||
foreach($ptr as $vurl) {
|
||||
if(strpos($s['body'],$vurl['href']) === false) {
|
||||
$s['body'] .= "\n\n" . '[zmg]' . $vurl['href'] . '[/zmg]';
|
||||
$s['body'] .= '[zmg]' . $vurl['href'] . '[/zmg]' . "\n\n" . $s['body'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif(is_string($act->obj['url'])) {
|
||||
if(strpos($s['body'],$act->obj['url']) === false) {
|
||||
$s['body'] .= "\n\n" . '[zmg]' . $act->obj['url'] . '[/zmg]';
|
||||
$s['body'] .= '[zmg]' . $act->obj['url'] . '[/zmg]' . "\n\n" . $s['body'];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1812,7 +1857,8 @@ class Activity {
|
||||
$s['item_private'] = 1;
|
||||
|
||||
set_iconfig($s,'activitypub','recips',$act->raw_recips);
|
||||
// @FIXME: $parent is not defined
|
||||
|
||||
$parent = (($s['parent_mid'] && $s['parent_mid'] === $s['mid']) ? true : false);
|
||||
if($parent) {
|
||||
set_iconfig($s,'activitypub','rawmsg',$act->raw,1);
|
||||
}
|
||||
@ -1821,6 +1867,265 @@ class Activity {
|
||||
|
||||
}
|
||||
|
||||
static function store($channel,$observer_hash,$act,$item,$fetch_parents = true) {
|
||||
|
||||
$is_sys_channel = is_sys_channel($channel['channel_id']);
|
||||
|
||||
// Mastodon only allows visibility in public timelines if the public inbox is listed in the 'to' field.
|
||||
// They are hidden in the public timeline if the public inbox is listed in the 'cc' field.
|
||||
// This is not part of the activitypub protocol - we might change this to show all public posts in pubstream at some point.
|
||||
|
||||
$pubstream = ((is_array($act->obj) && array_key_exists('to', $act->obj) && in_array(ACTIVITY_PUBLIC_INBOX, $act->obj['to'])) ? true : false);
|
||||
$is_parent = (($item['parent_mid'] && $item['parent_mid'] === $item['mid']) ? true : false);
|
||||
|
||||
if($is_parent && (! perm_is_allowed($channel['channel_id'],$observer_hash,'send_stream') && ! ($is_sys_channel && $pubstream))) {
|
||||
logger('no permission');
|
||||
return;
|
||||
}
|
||||
|
||||
if(is_array($act->obj)) {
|
||||
$content = self::get_content($act->obj);
|
||||
}
|
||||
if(! $content) {
|
||||
logger('no content');
|
||||
return;
|
||||
}
|
||||
|
||||
$item['aid'] = $channel['channel_account_id'];
|
||||
$item['uid'] = $channel['channel_id'];
|
||||
$s['uuid'] = '';
|
||||
|
||||
// Friendica sends the diaspora guid in a nonstandard field via AP
|
||||
if($act->obj['diaspora:guid'])
|
||||
$s['uuid'] = $act->obj['diaspora:guid'];
|
||||
|
||||
if(! ( $item['author_xchan'] && $item['owner_xchan'])) {
|
||||
logger('owner or author missing.');
|
||||
return;
|
||||
}
|
||||
|
||||
if($channel['channel_system']) {
|
||||
if(! MessageFilter::evaluate($item,get_config('system','pubstream_incl'),get_config('system','pubstream_excl'))) {
|
||||
logger('post is filtered');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$abook = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
|
||||
dbesc($observer_hash),
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
|
||||
if($abook) {
|
||||
if(! post_is_importable($item,$abook[0])) {
|
||||
logger('post is filtered');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($act->obj['conversation']) {
|
||||
set_iconfig($item,'ostatus','conversation',$act->obj['conversation'],1);
|
||||
}
|
||||
|
||||
// This isn't perfect but the best we can do for now.
|
||||
|
||||
$item['comment_policy'] = 'authenticated';
|
||||
|
||||
set_iconfig($item,'activitypub','recips',$act->raw_recips);
|
||||
|
||||
if(! $is_parent) {
|
||||
$p = q("select parent_mid from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['parent_mid']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
if(! $p) {
|
||||
$a = (($fetch_parents) ? self::fetch_and_store_parents($channel,$act,$item) : false);
|
||||
if($a) {
|
||||
$p = q("select parent_mid from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['parent_mid']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
logger('could not fetch parents');
|
||||
return;
|
||||
|
||||
// @TODO we maybe could accept these is we formatted the body correctly with share_bb()
|
||||
// or at least provided a link to the object
|
||||
// if(in_array($act->type,[ 'Like','Dislike' ])) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// @TODO do we actually want that?
|
||||
// if no parent was fetched, turn into a top-level post
|
||||
|
||||
// turn into a top level post
|
||||
// $s['parent_mid'] = $s['mid'];
|
||||
// $s['thr_parent'] = $s['mid'];
|
||||
}
|
||||
}
|
||||
if($p[0]['parent_mid'] !== $item['parent_mid']) {
|
||||
$item['thr_parent'] = $item['parent_mid'];
|
||||
}
|
||||
else {
|
||||
$item['thr_parent'] = $p[0]['parent_mid'];
|
||||
}
|
||||
$item['parent_mid'] = $p[0]['parent_mid'];
|
||||
}
|
||||
|
||||
$r = q("select id, created, edited from item where mid = '%s' and uid = %d limit 1",
|
||||
dbesc($item['mid']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
if($r) {
|
||||
if($item['edited'] > $r[0]['edited']) {
|
||||
$item['id'] = $r[0]['id'];
|
||||
$x = item_store_update($item);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$x = item_store($item);
|
||||
}
|
||||
|
||||
if(is_array($x) && $x['item_id']) {
|
||||
if($is_parent) {
|
||||
if($item['owner_xchan'] === $channel['channel_hash']) {
|
||||
// We are the owner of this conversation, so send all received comments back downstream
|
||||
Master::Summon(array('Notifier','comment-import',$x['item_id']));
|
||||
}
|
||||
$r = q("select * from item where id = %d limit 1",
|
||||
intval($x['item_id'])
|
||||
);
|
||||
if($r) {
|
||||
send_status_notifications($x['item_id'],$r[0]);
|
||||
}
|
||||
}
|
||||
sync_an_item($channel['channel_id'],$x['item_id']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static public function fetch_and_store_parents($channel,$act,$item) {
|
||||
|
||||
logger('fetching parents');
|
||||
|
||||
$p = [];
|
||||
|
||||
$current_act = $act;
|
||||
$current_item = $item;
|
||||
|
||||
while($current_item['parent_mid'] !== $current_item['mid']) {
|
||||
$n = ActivityStreams::fetch($current_item['parent_mid'], $channel);
|
||||
if(! $n) {
|
||||
break;
|
||||
}
|
||||
$a = new ActivityStreams($n);
|
||||
|
||||
//logger($a->debug());
|
||||
|
||||
if(! $a->is_valid()) {
|
||||
break;
|
||||
}
|
||||
|
||||
$replies = null;
|
||||
if(isset($a->obj['replies']['first']['items'])) {
|
||||
$replies = $a->obj['replies']['first']['items'];
|
||||
// we already have this one
|
||||
array_diff($replies, [$current_item['mid']]);
|
||||
}
|
||||
|
||||
$item = null;
|
||||
|
||||
switch($a->type) {
|
||||
case 'Create':
|
||||
case 'Update':
|
||||
case 'Like':
|
||||
case 'Dislike':
|
||||
case 'Announce':
|
||||
$item = self::decode_note($a);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
if(! $item) {
|
||||
break;
|
||||
}
|
||||
|
||||
array_unshift($p,[ $a, $item, $replies]);
|
||||
|
||||
if($item['parent_mid'] === $item['mid'] || count($p) > 20) {
|
||||
break;
|
||||
}
|
||||
|
||||
$current_act = $a;
|
||||
$current_item = $item;
|
||||
}
|
||||
|
||||
if($p) {
|
||||
foreach($p as $pv) {
|
||||
self::store($channel,$pv[0]->actor['id'],$pv[0],$pv[1],false);
|
||||
if($pv[2])
|
||||
self::fetch_and_store_replies($channel, $pv[2]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static public function fetch_and_store_replies($channel, $arr) {
|
||||
|
||||
logger('fetching replies');
|
||||
|
||||
$p = [];
|
||||
|
||||
foreach($arr as $url) {
|
||||
|
||||
$n = ActivityStreams::fetch($url, $channel);
|
||||
if(! $n) {
|
||||
break;
|
||||
}
|
||||
|
||||
$a = new ActivityStreams($n);
|
||||
|
||||
if(! $a->is_valid()) {
|
||||
break;
|
||||
}
|
||||
|
||||
$item = null;
|
||||
|
||||
switch($a->type) {
|
||||
case 'Create':
|
||||
case 'Update':
|
||||
case 'Like':
|
||||
case 'Dislike':
|
||||
case 'Announce':
|
||||
$item = self::decode_note($a);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(! $item) {
|
||||
break;
|
||||
}
|
||||
|
||||
array_unshift($p,[ $a, $item ]);
|
||||
|
||||
}
|
||||
|
||||
if($p) {
|
||||
foreach($p as $pv) {
|
||||
self::store($channel,$pv[0]->actor['id'],$pv[0],$pv[1],false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static function announce_note($channel,$observer_hash,$act) {
|
||||
|
||||
$s = [];
|
||||
@ -1941,25 +2246,21 @@ class Activity {
|
||||
$x = item_store($s);
|
||||
}
|
||||
|
||||
|
||||
if(is_array($x) && $x['item_id']) {
|
||||
// @FIXME: $parent is not defined
|
||||
if($parent) {
|
||||
if($s['owner_xchan'] === $channel['channel_hash']) {
|
||||
// We are the owner of this conversation, so send all received comments back downstream
|
||||
Master::Summon(array('Notifier','comment-import',$x['item_id']));
|
||||
}
|
||||
$r = q("select * from item where id = %d limit 1",
|
||||
intval($x['item_id'])
|
||||
);
|
||||
if($r) {
|
||||
send_status_notifications($x['item_id'],$r[0]);
|
||||
}
|
||||
if($s['owner_xchan'] === $channel['channel_hash']) {
|
||||
// We are the owner of this conversation, so send all received comments back downstream
|
||||
Master::Summon(array('Notifier','comment-import',$x['item_id']));
|
||||
}
|
||||
$r = q("select * from item where id = %d limit 1",
|
||||
intval($x['item_id'])
|
||||
);
|
||||
if($r) {
|
||||
send_status_notifications($x['item_id'],$r[0]);
|
||||
}
|
||||
|
||||
sync_an_item($channel['channel_id'],$x['item_id']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static function like_note($channel,$observer_hash,$act) {
|
||||
@ -2229,4 +2530,4 @@ class Activity {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
@ -2037,7 +2037,7 @@ class Libzot {
|
||||
$item_found = false;
|
||||
$post_id = 0;
|
||||
|
||||
$r = q("select id, author_xchan, owner_xchan, source_xchan, item_deleted from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' )
|
||||
$r = q("select * from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' )
|
||||
and mid = '%s' and uid = %d limit 1",
|
||||
dbesc($sender),
|
||||
dbesc($sender),
|
||||
@ -2047,10 +2047,12 @@ class Libzot {
|
||||
);
|
||||
|
||||
if($r) {
|
||||
if($r[0]['author_xchan'] === $sender || $r[0]['owner_xchan'] === $sender || $r[0]['source_xchan'] === $sender)
|
||||
$stored = $r[0];
|
||||
|
||||
if($stored['author_xchan'] === $sender || $stored['owner_xchan'] === $sender || $stored['source_xchan'] === $sender)
|
||||
$ownership_valid = true;
|
||||
|
||||
$post_id = $r[0]['id'];
|
||||
$post_id = $stored['id'];
|
||||
$item_found = true;
|
||||
}
|
||||
else {
|
||||
@ -2074,8 +2076,27 @@ class Libzot {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($stored['resource_type'] === 'event') {
|
||||
$i = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc($stored['resource_id']),
|
||||
intval($uid)
|
||||
);
|
||||
if ($i) {
|
||||
if ($i[0]['event_xchan'] === $sender) {
|
||||
q("delete from event where event_hash = '%s' and uid = %d",
|
||||
dbesc($stored['resource_id']),
|
||||
intval($uid)
|
||||
);
|
||||
}
|
||||
else {
|
||||
logger('delete linked event: not owner');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($item_found) {
|
||||
if(intval($r[0]['item_deleted'])) {
|
||||
if(intval($stored['item_deleted'])) {
|
||||
logger('delete_imported_item: item was already deleted');
|
||||
if(! $relay)
|
||||
return false;
|
||||
@ -2087,10 +2108,10 @@ class Libzot {
|
||||
// back, and we aren't going to (or shouldn't at any rate) delete it again in the future - so losing
|
||||
// this information from the metadata should have no other discernible impact.
|
||||
|
||||
if (($r[0]['id'] != $r[0]['parent']) && intval($r[0]['item_origin'])) {
|
||||
if (($stored['id'] != $stored['parent']) && intval($stored['item_origin'])) {
|
||||
q("update item set item_origin = 0 where id = %d and uid = %d",
|
||||
intval($r[0]['id']),
|
||||
intval($r[0]['uid'])
|
||||
intval($stored['id']),
|
||||
intval($stored['uid'])
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -2766,7 +2787,7 @@ class Libzot {
|
||||
|
||||
$profile['description'] = $p[0]['pdesc'];
|
||||
$profile['birthday'] = $p[0]['dob'];
|
||||
if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],$e['channel_timezone'])) !== ''))
|
||||
if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],'UTC')) !== ''))
|
||||
$profile['next_birthday'] = $bd;
|
||||
|
||||
if($age = age($p[0]['dob'],$e['channel_timezone'],''))
|
||||
|
@ -191,7 +191,7 @@ class NativeWiki {
|
||||
return array('item' => null, 'success' => false);
|
||||
}
|
||||
else {
|
||||
$drop = drop_item($item['id'], false, DROPITEM_NORMAL, true);
|
||||
$drop = drop_item($item['id'], false, DROPITEM_NORMAL);
|
||||
}
|
||||
|
||||
info( t('Wiki files deleted successfully'));
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -27,7 +27,9 @@ class Apschema extends \Zotlabs\Web\Controller {
|
||||
'nomadicLocation' => 'zot:nomadicLocation',
|
||||
'nomadicHubs' => 'zot:nomadicHubs',
|
||||
'emojiReaction' => 'zot:emojiReaction',
|
||||
|
||||
'expires' => 'zot:expires',
|
||||
'directMessage' => 'zot:directMessage',
|
||||
|
||||
'magicEnv' => [
|
||||
'@id' => 'zot:magicEnv',
|
||||
'@type' => '@id'
|
||||
@ -39,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'
|
||||
|
||||
]
|
||||
];
|
||||
|
||||
@ -53,4 +60,4 @@ class Apschema extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
|
||||
use App;
|
||||
use Zotlabs\Web\Controller;
|
||||
|
||||
require_once('include/conversation.php');
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/datetime.php');
|
||||
@ -9,15 +13,13 @@ require_once('include/items.php');
|
||||
require_once('include/html2plain.php');
|
||||
|
||||
|
||||
class Cal extends \Zotlabs\Web\Controller {
|
||||
class Cal extends Controller {
|
||||
|
||||
function init() {
|
||||
if(observer_prohibited()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
|
||||
if(argc() > 1) {
|
||||
$nick = argv(1);
|
||||
|
||||
@ -25,19 +27,21 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||
|
||||
$channelx = channelx_by_nick($nick);
|
||||
|
||||
if(! $channelx)
|
||||
if(! $channelx) {
|
||||
notice( t('Channel not found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
\App::$data['channel'] = $channelx;
|
||||
App::$data['channel'] = $channelx;
|
||||
|
||||
$observer = \App::get_observer();
|
||||
\App::$data['observer'] = $observer;
|
||||
$observer = App::get_observer();
|
||||
App::$data['observer'] = $observer;
|
||||
|
||||
$observer_xchan = (($observer) ? $observer['xchan_hash'] : '');
|
||||
|
||||
head_set_icon(\App::$data['channel']['xchan_photo_s']);
|
||||
head_set_icon(App::$data['channel']['xchan_photo_s']);
|
||||
|
||||
\App::$page['htmlhead'] .= "<script> var profile_uid = " . ((\App::$data['channel']) ? \App::$data['channel']['channel_id'] : 0) . "; </script>" ;
|
||||
App::$page['htmlhead'] .= "<script> var profile_uid = " . ((App::$data['channel']) ? App::$data['channel']['channel_id'] : 0) . "; </script>" ;
|
||||
|
||||
}
|
||||
|
||||
@ -52,18 +56,8 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||
return;
|
||||
}
|
||||
|
||||
$channel = null;
|
||||
|
||||
if(argc() > 1) {
|
||||
$channel = channelx_by_nick(argv(1));
|
||||
}
|
||||
|
||||
|
||||
if(! $channel) {
|
||||
notice( t('Channel not found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$channel = App::$data['channel'];
|
||||
|
||||
// since we don't currently have an event permission - use the stream permission
|
||||
|
||||
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_stream')) {
|
||||
@ -72,287 +66,152 @@ class Cal extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
nav_set_selected('Calendar');
|
||||
|
||||
head_add_css('/library/fullcalendar/packages/core/main.min.css');
|
||||
head_add_css('/library/fullcalendar/packages/daygrid/main.min.css');
|
||||
head_add_css('cdav_calendar.css');
|
||||
|
||||
head_add_js('/library/fullcalendar/packages/core/main.min.js');
|
||||
head_add_js('/library/fullcalendar/packages/daygrid/main.min.js');
|
||||
|
||||
$sql_extra = permissions_sql($channel['channel_id'], get_observer_hash(), 'event');
|
||||
|
||||
if(! perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts') || App::$profile['hide_friends'])
|
||||
$sql_extra .= " and etype != 'birthday' ";
|
||||
|
||||
$sql_extra = permissions_sql($channel['channel_id'],get_observer_hash(),'event');
|
||||
|
||||
$first_day = feature_enabled($channel['channel_id'], 'events_cal_first_day');
|
||||
$first_day = feature_enabled($channel['channel_id'], 'cal_first_day');
|
||||
$first_day = (($first_day) ? $first_day : 0);
|
||||
|
||||
$htpl = get_markup_template('event_head.tpl');
|
||||
\App::$page['htmlhead'] .= replace_macros($htpl,array(
|
||||
'$baseurl' => z_root(),
|
||||
'$module_url' => '/cal/' . $channel['channel_address'],
|
||||
'$modparams' => 2,
|
||||
'$lang' => \App::$language,
|
||||
'$first_day' => $first_day
|
||||
));
|
||||
|
||||
$o = '';
|
||||
|
||||
$mode = 'view';
|
||||
$y = 0;
|
||||
$m = 0;
|
||||
$ignored = ((x($_REQUEST,'ignored')) ? " and dismissed = " . intval($_REQUEST['ignored']) . " " : '');
|
||||
|
||||
// logger('args: ' . print_r(\App::$argv,true));
|
||||
|
||||
if(argc() > 3 && intval(argv(2)) && intval(argv(3))) {
|
||||
$mode = 'view';
|
||||
$y = intval(argv(2));
|
||||
$m = intval(argv(3));
|
||||
}
|
||||
if(argc() <= 3) {
|
||||
$mode = 'view';
|
||||
$event_id = argv(2);
|
||||
$start = '';
|
||||
$finish = '';
|
||||
|
||||
if (argv(2) === 'json') {
|
||||
if (x($_GET,'start')) $start = $_GET['start'];
|
||||
if (x($_GET,'end')) $finish = $_GET['end'];
|
||||
}
|
||||
|
||||
if($mode == 'view') {
|
||||
|
||||
/* edit/create form */
|
||||
if($event_id) {
|
||||
$r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc($event_id),
|
||||
intval($channel['channel_id'])
|
||||
);
|
||||
if(count($r))
|
||||
$orig_event = $r[0];
|
||||
}
|
||||
|
||||
|
||||
// Passed parameters overrides anything found in the DB
|
||||
if(!x($orig_event))
|
||||
$orig_event = array();
|
||||
|
||||
|
||||
|
||||
$tz = date_default_timezone_get();
|
||||
if(x($orig_event))
|
||||
$tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC');
|
||||
|
||||
$syear = datetime_convert('UTC', $tz, $sdt, 'Y');
|
||||
$smonth = datetime_convert('UTC', $tz, $sdt, 'm');
|
||||
$sday = datetime_convert('UTC', $tz, $sdt, 'd');
|
||||
$shour = datetime_convert('UTC', $tz, $sdt, 'H');
|
||||
$sminute = datetime_convert('UTC', $tz, $sdt, 'i');
|
||||
|
||||
$stext = datetime_convert('UTC',$tz,$sdt);
|
||||
$stext = substr($stext,0,14) . "00:00";
|
||||
|
||||
$fyear = datetime_convert('UTC', $tz, $fdt, 'Y');
|
||||
$fmonth = datetime_convert('UTC', $tz, $fdt, 'm');
|
||||
$fday = datetime_convert('UTC', $tz, $fdt, 'd');
|
||||
$fhour = datetime_convert('UTC', $tz, $fdt, 'H');
|
||||
$fminute = datetime_convert('UTC', $tz, $fdt, 'i');
|
||||
|
||||
$ftext = datetime_convert('UTC',$tz,$fdt);
|
||||
$ftext = substr($ftext,0,14) . "00:00";
|
||||
|
||||
$type = ((x($orig_event)) ? $orig_event['etype'] : 'event');
|
||||
|
||||
$f = get_config('system','event_input_format');
|
||||
if(! $f)
|
||||
$f = 'ymd';
|
||||
|
||||
$catsenabled = feature_enabled($channel['channel_id'],'categories');
|
||||
|
||||
|
||||
$show_bd = perm_is_allowed($channel['channel_id'], get_observer_hash(), 'view_contacts');
|
||||
if(! $show_bd) {
|
||||
$sql_extra .= " and event.etype != 'birthday' ";
|
||||
}
|
||||
|
||||
|
||||
$category = '';
|
||||
|
||||
$thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y');
|
||||
$thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m');
|
||||
if(! $y)
|
||||
$y = intval($thisyear);
|
||||
if(! $m)
|
||||
$m = intval($thismonth);
|
||||
|
||||
// Put some limits on dates. The PHP date functions don't seem to do so well before 1900.
|
||||
// An upper limit was chosen to keep search engines from exploring links millions of years in the future.
|
||||
|
||||
if($y < 1901)
|
||||
$y = 1900;
|
||||
if($y > 2099)
|
||||
$y = 2100;
|
||||
|
||||
$nextyear = $y;
|
||||
$nextmonth = $m + 1;
|
||||
if($nextmonth > 12) {
|
||||
$nextmonth = 1;
|
||||
$nextyear ++;
|
||||
}
|
||||
|
||||
$prevyear = $y;
|
||||
if($m > 1)
|
||||
$prevmonth = $m - 1;
|
||||
else {
|
||||
$prevmonth = 12;
|
||||
$prevyear --;
|
||||
}
|
||||
|
||||
$dim = get_dim($y,$m);
|
||||
$start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0);
|
||||
$finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59);
|
||||
|
||||
|
||||
if (argv(2) === 'json'){
|
||||
if (x($_GET,'start')) $start = $_GET['start'];
|
||||
if (x($_GET,'end')) $finish = $_GET['end'];
|
||||
}
|
||||
|
||||
$start = datetime_convert('UTC','UTC',$start);
|
||||
$finish = datetime_convert('UTC','UTC',$finish);
|
||||
|
||||
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
|
||||
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
|
||||
|
||||
$start = datetime_convert('UTC','UTC',$start);
|
||||
$finish = datetime_convert('UTC','UTC',$finish);
|
||||
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
|
||||
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
|
||||
|
||||
if(! perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'view_contacts'))
|
||||
$sql_extra .= " and etype != 'birthday' ";
|
||||
if (x($_GET, 'id')) {
|
||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
||||
from event left join item on item.resource_id = event.event_hash
|
||||
where item.resource_type = 'event' and event.uid = %d and event.id = %d $sql_extra limit 1",
|
||||
intval($channel['channel_id']),
|
||||
intval($_GET['id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
// fixed an issue with "nofinish" events not showing up in the calendar.
|
||||
// There's still an issue if the finish date crosses the end of month.
|
||||
// Noting this for now - it will need to be fixed here and in Friendica.
|
||||
// Ultimately the finish date shouldn't be involved in the query.
|
||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
||||
from event left join item on event.event_hash = item.resource_id
|
||||
where item.resource_type = 'event' and event.uid = %d and event.uid = item.uid
|
||||
AND (( event.adjust = 0 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' )
|
||||
OR ( event.adjust = 1 AND ( event.dtend >= '%s' or event.nofinish = 1 ) AND event.dtstart <= '%s' ))
|
||||
$sql_extra",
|
||||
intval($channel['channel_id']),
|
||||
dbesc($start),
|
||||
dbesc($finish),
|
||||
dbesc($adjust_start),
|
||||
dbesc($adjust_finish)
|
||||
);
|
||||
}
|
||||
|
||||
if($r) {
|
||||
xchan_query($r);
|
||||
$r = fetch_post_tags($r,true);
|
||||
$r = sort_by_date($r);
|
||||
}
|
||||
|
||||
if (x($_GET,'id')){
|
||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
|
||||
from event left join item on resource_id = event_hash where resource_type = 'event' and event.uid = %d and event.id = %d $sql_extra limit 1",
|
||||
intval($channel['channel_id']),
|
||||
intval($_GET['id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
// fixed an issue with "nofinish" events not showing up in the calendar.
|
||||
// There's still an issue if the finish date crosses the end of month.
|
||||
// Noting this for now - it will need to be fixed here and in Friendica.
|
||||
// Ultimately the finish date shouldn't be involved in the query.
|
||||
$events = [];
|
||||
|
||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan
|
||||
from event left join item on event_hash = resource_id
|
||||
where resource_type = 'event' and event.uid = %d and event.uid = item.uid $ignored
|
||||
AND (( adjust = 0 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )
|
||||
OR ( adjust = 1 AND ( dtend >= '%s' or nofinish = 1 ) AND dtstart <= '%s' )) $sql_extra ",
|
||||
intval($channel['channel_id']),
|
||||
dbesc($start),
|
||||
dbesc($finish),
|
||||
dbesc($adjust_start),
|
||||
dbesc($adjust_finish)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
$links = array();
|
||||
|
||||
if($r) {
|
||||
xchan_query($r);
|
||||
$r = fetch_post_tags($r,true);
|
||||
|
||||
$r = sort_by_date($r);
|
||||
}
|
||||
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
||||
if(! x($links,$j))
|
||||
$links[$j] = z_root() . '/' . \App::$cmd . '#link-' . $j;
|
||||
if($r) {
|
||||
|
||||
foreach($r as $rr) {
|
||||
|
||||
$tz = get_iconfig($rr, 'event', 'timezone');
|
||||
if(! $tz)
|
||||
$tz = 'UTC';
|
||||
|
||||
$start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
|
||||
if ($rr['nofinish']){
|
||||
$end = null;
|
||||
} else {
|
||||
$end = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c'));
|
||||
}
|
||||
}
|
||||
|
||||
$events=array();
|
||||
|
||||
$last_date = '';
|
||||
$fmt = t('l, F j');
|
||||
|
||||
if($r) {
|
||||
|
||||
foreach($r as $rr) {
|
||||
|
||||
$j = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'j') : datetime_convert('UTC','UTC',$rr['dtstart'],'j'));
|
||||
$d = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], $fmt) : datetime_convert('UTC','UTC',$rr['dtstart'],$fmt));
|
||||
$d = day_translate($d);
|
||||
|
||||
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'c') : datetime_convert('UTC','UTC',$rr['dtstart'],'c'));
|
||||
if ($rr['nofinish']){
|
||||
$end = null;
|
||||
} else {
|
||||
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c'));
|
||||
}
|
||||
|
||||
|
||||
$is_first = ($d !== $last_date);
|
||||
|
||||
$last_date = $d;
|
||||
|
||||
$edit = false;
|
||||
|
||||
$drop = false;
|
||||
|
||||
$title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
|
||||
if(! $title) {
|
||||
list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
|
||||
$title = strip_tags(html_entity_decode($title,ENT_QUOTES,'UTF-8'));
|
||||
}
|
||||
|
||||
$html = '';
|
||||
if (x($_GET,'id')) {
|
||||
$rr['timezone'] = $tz;
|
||||
$html = format_event_html($rr);
|
||||
$rr['desc'] = zidify_links(smilies(bbcode($rr['desc'])));
|
||||
$rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8',false);
|
||||
$rr['location'] = zidify_links(smilies(bbcode($rr['location'])));
|
||||
$events[] = array(
|
||||
'id'=>$rr['id'],
|
||||
'hash' => $rr['event_hash'],
|
||||
'start'=> $start,
|
||||
'end' => $end,
|
||||
'drop' => $drop,
|
||||
'allDay' => false,
|
||||
'title' => $title,
|
||||
|
||||
'j' => $j,
|
||||
'd' => $d,
|
||||
'edit' => $edit,
|
||||
'is_first'=>$is_first,
|
||||
'item'=>$rr,
|
||||
'html'=>$html,
|
||||
'plink' => array($rr['plink'],t('Link to Source'),'',''),
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
$events[] = array(
|
||||
'calendar_id' => 'channel_calendar',
|
||||
'rw' => true,
|
||||
'id'=>$rr['id'],
|
||||
'uri' => $rr['event_hash'],
|
||||
'timezone' => $tz,
|
||||
'start'=> $start,
|
||||
'end' => $end,
|
||||
'drop' => $drop,
|
||||
'allDay' => (($rr['adjust']) ? 0 : 1),
|
||||
'title' => html_entity_decode($rr['summary'], ENT_COMPAT, 'UTF-8'),
|
||||
'editable' => $edit ? true : false,
|
||||
'item' => $rr,
|
||||
'plink' => [$rr['plink'], t('Link to source')],
|
||||
'description' => html_entity_decode($rr['description'], ENT_COMPAT, 'UTF-8'),
|
||||
'location' => html_entity_decode($rr['location'], ENT_COMPAT, 'UTF-8'),
|
||||
'allow_cid' => expand_acl($rr['allow_cid']),
|
||||
'allow_gid' => expand_acl($rr['allow_gid']),
|
||||
'deny_cid' => expand_acl($rr['deny_cid']),
|
||||
'deny_gid' => expand_acl($rr['deny_gid']),
|
||||
'html' => $html
|
||||
);
|
||||
}
|
||||
|
||||
if (argv(2) === 'json'){
|
||||
echo json_encode($events); killme();
|
||||
}
|
||||
|
||||
// links: array('href', 'text', 'extra css classes', 'title')
|
||||
if (x($_GET,'id')){
|
||||
$tpl = get_markup_template("event_cal.tpl");
|
||||
}
|
||||
else {
|
||||
$tpl = get_markup_template("events_cal-js.tpl");
|
||||
}
|
||||
|
||||
$nick = $channel['channel_address'];
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$baseurl' => z_root(),
|
||||
'$new_event' => array(z_root().'/cal',(($event_id) ? t('Edit Event') : t('Create Event')),'',''),
|
||||
'$previus' => array(z_root()."/cal/$nick/$prevyear/$prevmonth",t('Previous'),'',''),
|
||||
'$next' => array(z_root()."/cal/$nick/$nextyear/$nextmonth",t('Next'),'',''),
|
||||
'$export' => array(z_root()."/cal/$nick/$y/$m/export",t('Export'),'',''),
|
||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||
'$events' => $events,
|
||||
'$upload' => t('Import'),
|
||||
'$submit' => t('Submit'),
|
||||
'$prev' => t('Previous'),
|
||||
'$next' => t('Next'),
|
||||
'$today' => t('Today'),
|
||||
'$form' => $form,
|
||||
'$expandform' => ((x($_GET,'expandform')) ? true : false)
|
||||
));
|
||||
|
||||
if (x($_GET,'id')){ echo $o; killme(); }
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
if (argv(2) === 'json') {
|
||||
echo json_encode($events);
|
||||
killme();
|
||||
}
|
||||
|
||||
if (x($_GET,'id')) {
|
||||
$o = replace_macros(get_markup_template("cal_event.tpl"), [
|
||||
'$events' => $events
|
||||
]);
|
||||
echo $o;
|
||||
killme();
|
||||
}
|
||||
|
||||
$nick = $channel['channel_address'];
|
||||
|
||||
$sources = '{
|
||||
id: \'channel_calendar\',
|
||||
url: \'/cal/' . $nick . '/json/\',
|
||||
color: \'#3a87ad\'
|
||||
}';
|
||||
|
||||
$o = replace_macros(get_markup_template("cal_calendar.tpl"), [
|
||||
'$sources' => $sources,
|
||||
'$lang' => App::$language,
|
||||
'$timezone' => date_default_timezone_get(),
|
||||
'$first_day' => $first_day,
|
||||
'$prev' => t('Previous'),
|
||||
'$next' => t('Next'),
|
||||
'$today' => t('Today'),
|
||||
'$title' => $title,
|
||||
'$dtstart' => $dtstart,
|
||||
'$dtend' => $dtend,
|
||||
'$nick' => $nick
|
||||
]);
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
@ -271,11 +272,17 @@ class Cdav extends Controller {
|
||||
if(!cdav_perms($id[0],$calendars,true))
|
||||
return;
|
||||
|
||||
$timezone = ((x($_POST,'timezone_select')) ? escape_tags(trim($_POST['timezone_select'])) : '');
|
||||
$tz = (($timezone) ? $timezone : date_default_timezone_get());
|
||||
|
||||
$allday = $_REQUEST['allday'];
|
||||
|
||||
$title = $_REQUEST['title'];
|
||||
$start = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtstart']);
|
||||
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
|
||||
$dtstart = new \DateTime($start);
|
||||
|
||||
if($_REQUEST['dtend']) {
|
||||
$end = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtend']);
|
||||
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
|
||||
$dtend = new \DateTime($end);
|
||||
}
|
||||
$description = $_REQUEST['description'];
|
||||
@ -301,16 +308,23 @@ class Cdav extends Controller {
|
||||
'DTSTART' => $dtstart
|
||||
]
|
||||
]);
|
||||
|
||||
if($dtend) {
|
||||
$vcalendar->VEVENT->add('DTEND', $dtend);
|
||||
$vcalendar->VEVENT->DTEND['TZID'] = App::$timezone;
|
||||
if($allday)
|
||||
$vcalendar->VEVENT->DTEND['VALUE'] = 'DATE';
|
||||
else
|
||||
$vcalendar->VEVENT->DTEND['TZID'] = $tz;
|
||||
}
|
||||
if($description)
|
||||
$vcalendar->VEVENT->add('DESCRIPTION', $description);
|
||||
if($location)
|
||||
$vcalendar->VEVENT->add('LOCATION', $location);
|
||||
|
||||
$vcalendar->VEVENT->DTSTART['TZID'] = App::$timezone;
|
||||
if($allday)
|
||||
$vcalendar->VEVENT->DTSTART['VALUE'] = 'DATE';
|
||||
else
|
||||
$vcalendar->VEVENT->DTSTART['TZID'] = $tz;
|
||||
|
||||
$calendarData = $vcalendar->serialize();
|
||||
|
||||
@ -348,12 +362,17 @@ class Cdav extends Controller {
|
||||
if(!cdav_perms($id[0],$calendars,true))
|
||||
return;
|
||||
|
||||
$timezone = ((x($_POST,'timezone_select')) ? escape_tags(trim($_POST['timezone_select'])) : '');
|
||||
$tz = (($timezone) ? $timezone : date_default_timezone_get());
|
||||
|
||||
$allday = $_REQUEST['allday'];
|
||||
|
||||
$uri = $_REQUEST['uri'];
|
||||
$title = $_REQUEST['title'];
|
||||
$start = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtstart']);
|
||||
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
|
||||
$dtstart = new \DateTime($start);
|
||||
if($_REQUEST['dtend']) {
|
||||
$end = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtend']);
|
||||
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
|
||||
$dtend = new \DateTime($end);
|
||||
}
|
||||
$description = $_REQUEST['description'];
|
||||
@ -365,12 +384,23 @@ class Cdav extends Controller {
|
||||
|
||||
if($title)
|
||||
$vcalendar->VEVENT->SUMMARY = $title;
|
||||
if($dtstart)
|
||||
if($dtstart) {
|
||||
$vcalendar->VEVENT->DTSTART = $dtstart;
|
||||
if($dtend)
|
||||
if($allday)
|
||||
$vcalendar->VEVENT->DTSTART['VALUE'] = 'DATE';
|
||||
else
|
||||
$vcalendar->VEVENT->DTSTART['TZID'] = $tz;
|
||||
}
|
||||
if($dtend) {
|
||||
$vcalendar->VEVENT->DTEND = $dtend;
|
||||
if($allday)
|
||||
$vcalendar->VEVENT->DTEND['VALUE'] = 'DATE';
|
||||
else
|
||||
$vcalendar->VEVENT->DTEND['TZID'] = $tz;
|
||||
}
|
||||
else
|
||||
unset($vcalendar->VEVENT->DTEND);
|
||||
|
||||
if($description)
|
||||
$vcalendar->VEVENT->DESCRIPTION = $description;
|
||||
if($location)
|
||||
@ -406,11 +436,16 @@ class Cdav extends Controller {
|
||||
if(!cdav_perms($id[0],$calendars,true))
|
||||
return;
|
||||
|
||||
$timezone = ((x($_POST,'timezone_select')) ? escape_tags(trim($_POST['timezone_select'])) : '');
|
||||
$tz = (($timezone) ? $timezone : date_default_timezone_get());
|
||||
|
||||
$allday = $_REQUEST['allday'];
|
||||
|
||||
$uri = $_REQUEST['uri'];
|
||||
$start = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtstart']);
|
||||
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
|
||||
$dtstart = new \DateTime($start);
|
||||
if($_REQUEST['dtend']) {
|
||||
$end = datetime_convert(App::$timezone, 'UTC', $_REQUEST['dtend']);
|
||||
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
|
||||
$dtend = new \DateTime($end);
|
||||
}
|
||||
|
||||
@ -420,13 +455,20 @@ class Cdav extends Controller {
|
||||
|
||||
if($dtstart) {
|
||||
$vcalendar->VEVENT->DTSTART = $dtstart;
|
||||
if($allday)
|
||||
$vcalendar->VEVENT->DTSTART['VALUE'] = 'DATE';
|
||||
else
|
||||
$vcalendar->VEVENT->DTSTART['TZID'] = $tz;
|
||||
}
|
||||
if($dtend) {
|
||||
$vcalendar->VEVENT->DTEND = $dtend;
|
||||
if($allday)
|
||||
$vcalendar->VEVENT->DTEND['VALUE'] = 'DATE';
|
||||
else
|
||||
$vcalendar->VEVENT->DTEND['TZID'] = $tz;
|
||||
}
|
||||
else {
|
||||
else
|
||||
unset($vcalendar->VEVENT->DTEND);
|
||||
}
|
||||
|
||||
$calendarData = $vcalendar->serialize();
|
||||
|
||||
@ -915,8 +957,13 @@ class Cdav extends Controller {
|
||||
xchan_query($r);
|
||||
$r = fetch_post_tags($r,true);
|
||||
|
||||
$r[0]['dtstart'] = (($r[0]['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$r[0]['dtstart'], 'c') : datetime_convert('UTC','UTC',$r[0]['dtstart'],'c'));
|
||||
$r[0]['dtend'] = (($r[0]['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$r[0]['dtend'], 'c') : datetime_convert('UTC','UTC',$r[0]['dtend'],'c'));
|
||||
$tz = get_iconfig($r[0], 'event', 'timezone');
|
||||
if(! $tz)
|
||||
$tz = 'UTC';
|
||||
|
||||
$r[0]['timezone'] = $tz;
|
||||
$r[0]['dtstart'] = (($r[0]['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $r[0]['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $r[0]['dtstart'], 'c'));
|
||||
$r[0]['dtend'] = (($r[0]['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $r[0]['dtend'], 'c') : datetime_convert('UTC', 'UTC' ,$r[0]['dtend'], 'c'));
|
||||
|
||||
$r[0]['plink'] = [$r[0]['plink'], t('Link to source')];
|
||||
|
||||
@ -984,9 +1031,11 @@ class Cdav extends Controller {
|
||||
$first_day = feature_enabled(local_channel(), 'cal_first_day');
|
||||
$first_day = (($first_day) ? $first_day : 0);
|
||||
|
||||
$title = ['title', t('Event title')];
|
||||
$title = ['title', t('Event title') ];
|
||||
$dtstart = ['dtstart', t('Start date and time')];
|
||||
$dtend = ['dtend', t('End date and time')];
|
||||
$timezone_select = ['timezone_select' , t('Timezone:'), date_default_timezone_get(), '', get_timezones()];
|
||||
|
||||
$description = ['description', t('Description')];
|
||||
$location = ['location', t('Location')];
|
||||
|
||||
@ -1000,14 +1049,13 @@ class Cdav extends Controller {
|
||||
//$acl = (($orig_event['event_xchan']) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $perm_defaults), false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream')));
|
||||
$acl = populate_acl($perm_defaults, false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_stream'));
|
||||
|
||||
//$permissions = ((x($orig_event)) ? $orig_event : $perm_defaults);
|
||||
$permissions = $perm_defaults;
|
||||
$permissions = (($resource_id) ? $resource : $perm_defaults);
|
||||
|
||||
$o .= replace_macros(get_markup_template('cdav_calendar.tpl'), [
|
||||
'$sources' => $sources,
|
||||
'$color' => $color,
|
||||
'$lang' => App::$language,
|
||||
'$timezone' => App::$timezone,
|
||||
'$timezone' => date_default_timezone_get(),
|
||||
'$first_day' => $first_day,
|
||||
'$prev' => t('Previous'),
|
||||
'$next' => t('Next'),
|
||||
@ -1047,7 +1095,8 @@ class Cdav extends Controller {
|
||||
'$categories_label' => t('Categories'),
|
||||
|
||||
'$resource' => json_encode($resource),
|
||||
'$categories' => $categories
|
||||
'$categories' => $categories,
|
||||
'$timezone_select' => ((feature_enabled(local_channel(),'event_tz_select')) ? $timezone_select : '')
|
||||
]);
|
||||
|
||||
return $o;
|
||||
@ -1076,8 +1125,8 @@ class Cdav extends Controller {
|
||||
$filters['comp-filters'][0]['time-range']['end'] = $end;
|
||||
|
||||
$uris = $caldavBackend->calendarQuery($id, $filters);
|
||||
|
||||
if($uris) {
|
||||
|
||||
$objects = $caldavBackend->getMultipleCalendarObjects($id, $uris);
|
||||
foreach($objects as $object) {
|
||||
|
||||
@ -1096,30 +1145,33 @@ class Cdav extends Controller {
|
||||
$dtend = (string)$vevent->DTEND;
|
||||
$description = (string)$vevent->DESCRIPTION;
|
||||
$location = (string)$vevent->LOCATION;
|
||||
$timezone = (string)$vevent->DTSTART['TZID'];
|
||||
$timezone_str = (string)$vevent->DTSTART['TZID'];
|
||||
$rw = ((cdav_perms($id[0],$calendars,true)) ? true : false);
|
||||
$editable = $rw ? true : false;
|
||||
$recurrent = ((isset($vevent->{'RECURRENCE-ID'})) ? true : false);
|
||||
|
||||
if($recurrent) {
|
||||
$editable = false;
|
||||
$timezone = $recurrent_timezone;
|
||||
$timezone_str = $recurrent_timezone;
|
||||
}
|
||||
|
||||
$allDay = false;
|
||||
// Try to get an usable olson format timezone
|
||||
$timezone_obj = \Sabre\VObject\TimeZoneUtil::getTimeZone($timezone_str, $vcalendar);
|
||||
$timezone = $timezone_obj->getName();
|
||||
|
||||
// allDay event rules
|
||||
if(!strpos($dtstart, 'T') && !strpos($dtend, 'T'))
|
||||
$allDay = true;
|
||||
if(strpos($dtstart, 'T000000') && strpos($dtend, 'T000000'))
|
||||
$allDay = true;
|
||||
// If we got nothing fallback to UTC
|
||||
if(! $timezone)
|
||||
$timezone = 'UTC';
|
||||
|
||||
$allDay = (((string)$vevent->DTSTART['VALUE'] == 'DATE') ? true : false);
|
||||
|
||||
$events[] = [
|
||||
'calendar_id' => $id,
|
||||
'uri' => $object['uri'],
|
||||
'title' => $title,
|
||||
'start' => datetime_convert($timezone, $timezone, $dtstart, 'c'),
|
||||
'end' => (($dtend) ? datetime_convert($timezone, $timezone, $dtend, 'c') : ''),
|
||||
'timezone' => $timezone,
|
||||
'start' => datetime_convert($timezone, date_default_timezone_get(), $dtstart, 'c'),
|
||||
'end' => (($dtend) ? datetime_convert($timezone, date_default_timezone_get(), $dtend, 'c') : ''),
|
||||
'description' => $description,
|
||||
'location' => $location,
|
||||
'allDay' => $allDay,
|
||||
|
@ -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,53 +21,21 @@ 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();
|
||||
|
||||
$start_text = escape_tags($_REQUEST['dtstart']);
|
||||
$finish_text = escape_tags($_REQUEST['dtend']);
|
||||
$uid = local_channel();
|
||||
|
||||
$adjust = intval($_POST['adjust']);
|
||||
$nofinish = intval($_POST['nofinish']);
|
||||
|
||||
$timezone = ((x($_POST,'timezone_select')) ? notags(trim($_POST['timezone_select'])) : '');
|
||||
// only allow editing your own events.
|
||||
if(($xchan) && ($xchan !== get_observer_hash()))
|
||||
return;
|
||||
|
||||
$timezone = ((x($_POST,'timezone_select')) ? escape_tags(trim($_POST['timezone_select'])) : '');
|
||||
$tz = (($timezone) ? $timezone : date_default_timezone_get());
|
||||
|
||||
$categories = escape_tags(trim($_POST['categories']));
|
||||
|
||||
// only allow editing your own events.
|
||||
|
||||
if(($xchan) && ($xchan !== get_observer_hash()))
|
||||
return;
|
||||
|
||||
if($start_text) {
|
||||
$start = $start_text;
|
||||
}
|
||||
else {
|
||||
$start = sprintf('%d-%d-%d %d:%d:0',$startyear,$startmonth,$startday,$starthour,$startminute);
|
||||
}
|
||||
|
||||
$adjust = intval($_POST['adjust']);
|
||||
|
||||
if($finish_text) {
|
||||
$finish = $finish_text;
|
||||
}
|
||||
else {
|
||||
$finish = sprintf('%d-%d-%d %d:%d:0',$finishyear,$finishmonth,$finishday,$finishhour,$finishminute);
|
||||
}
|
||||
|
||||
if($nofinish) {
|
||||
$finish = NULL_DATE;
|
||||
}
|
||||
|
||||
if($adjust) {
|
||||
$start = datetime_convert($tz,'UTC',$start);
|
||||
if(! $nofinish)
|
||||
$finish = datetime_convert($tz,'UTC',$finish);
|
||||
}
|
||||
else {
|
||||
$start = datetime_convert('UTC','UTC',$start);
|
||||
if(! $nofinish)
|
||||
$finish = datetime_convert('UTC','UTC',$finish);
|
||||
}
|
||||
$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']));
|
||||
@ -176,7 +144,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
$datarray['location'] = $location;
|
||||
$datarray['etype'] = $type;
|
||||
$datarray['adjust'] = $adjust;
|
||||
$datarray['nofinish'] = $nofinish;
|
||||
$datarray['nofinish'] = 0;
|
||||
$datarray['uid'] = local_channel();
|
||||
$datarray['account'] = get_account_id();
|
||||
$datarray['event_xchan'] = $channel['channel_hash'];
|
||||
@ -188,6 +156,8 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
$datarray['id'] = $event_id;
|
||||
$datarray['created'] = $created;
|
||||
$datarray['edited'] = $edited;
|
||||
$datarray['timezone'] = $tz;
|
||||
|
||||
|
||||
if(intval($_REQUEST['preview'])) {
|
||||
$html = format_event_html($datarray);
|
||||
@ -322,10 +292,9 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
|
||||
$start = datetime_convert('UTC','UTC',$start);
|
||||
$finish = datetime_convert('UTC','UTC',$finish);
|
||||
|
||||
$adjust_start = datetime_convert('UTC', date_default_timezone_get(), $start);
|
||||
$adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
|
||||
|
||||
|
||||
if (x($_GET,'id')){
|
||||
$r = q("SELECT event.*, item.plink, item.item_flags, item.author_xchan, item.owner_xchan, item.id as item_id
|
||||
from event left join item on item.resource_id = event.event_hash
|
||||
@ -335,7 +304,9 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
);
|
||||
}
|
||||
elseif($export) {
|
||||
$r = q("SELECT * from event where uid = %d and dtstart > '%s' and dtend > dtstart",
|
||||
$r = q("SELECT event.*, item.id as item_id
|
||||
from event left join item on item.resource_id = event.event_hash
|
||||
where event.uid = %d and event.dtstart > '%s' and event.dtend > event.dtstart",
|
||||
intval(local_channel()),
|
||||
dbesc(NULL_DATE)
|
||||
);
|
||||
@ -357,13 +328,11 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
dbesc($adjust_start),
|
||||
dbesc($adjust_finish)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if($r && ! $export) {
|
||||
xchan_query($r);
|
||||
$r = fetch_post_tags($r,true);
|
||||
|
||||
$r = sort_by_date($r);
|
||||
}
|
||||
|
||||
@ -373,17 +342,16 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
|
||||
foreach($r as $rr) {
|
||||
|
||||
$start = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtstart'], 'c') : datetime_convert('UTC','UTC',$rr['dtstart'],'c'));
|
||||
$tz = get_iconfig($rr, 'event', 'timezone');
|
||||
|
||||
if(! $tz)
|
||||
$tz = 'UTC';
|
||||
|
||||
$start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
|
||||
if ($rr['nofinish']){
|
||||
$end = null;
|
||||
} else {
|
||||
$end = (($rr['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$rr['dtend'], 'c') : datetime_convert('UTC','UTC',$rr['dtend'],'c'));
|
||||
|
||||
// give a fake end to birthdays so they get crammed into a
|
||||
// single day on the calendar
|
||||
|
||||
if($rr['etype'] === 'birthday')
|
||||
$end = null;
|
||||
$end = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c'));
|
||||
}
|
||||
|
||||
$catsenabled = feature_enabled(local_channel(),'categories');
|
||||
@ -399,14 +367,6 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
$allDay = false;
|
||||
|
||||
// allDay event rules
|
||||
if(!strpos($start, 'T') && !strpos($end, 'T'))
|
||||
$allDay = true;
|
||||
if(strpos($start, 'T00:00:00') && strpos($end, 'T00:00:00'))
|
||||
$allDay = true;
|
||||
|
||||
$edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array(z_root().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false);
|
||||
|
||||
$drop = array(z_root().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
|
||||
@ -416,16 +376,17 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
'rw' => true,
|
||||
'id'=>$rr['id'],
|
||||
'uri' => $rr['event_hash'],
|
||||
'timezone' => $tz,
|
||||
'start'=> $start,
|
||||
'end' => $end,
|
||||
'drop' => $drop,
|
||||
'allDay' => $allDay,
|
||||
'title' => htmlentities($rr['summary'], ENT_COMPAT, 'UTF-8', false),
|
||||
'allDay' => (($rr['adjust']) ? 0 : 1),
|
||||
'title' => html_entity_decode($rr['summary'], ENT_COMPAT, 'UTF-8'),
|
||||
'editable' => $edit ? true : false,
|
||||
'item'=>$rr,
|
||||
'item' => $rr,
|
||||
'plink' => [$rr['plink'], t('Link to source')],
|
||||
'description' => htmlentities($rr['description'], ENT_COMPAT, 'UTF-8', false),
|
||||
'location' => htmlentities($rr['location'], ENT_COMPAT, 'UTF-8', false),
|
||||
'description' => html_entity_decode($rr['description'], ENT_COMPAT, 'UTF-8'),
|
||||
'location' => html_entity_decode($rr['location'], ENT_COMPAT, 'UTF-8'),
|
||||
'allow_cid' => expand_acl($rr['allow_cid']),
|
||||
'allow_gid' => expand_acl($rr['allow_gid']),
|
||||
'deny_cid' => expand_acl($rr['deny_cid']),
|
||||
@ -441,7 +402,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
echo ical_wrapper($r);
|
||||
killme();
|
||||
}
|
||||
|
||||
|
||||
if (\App::$argv[1] === 'json'){
|
||||
json_return_and_die($events);
|
||||
}
|
||||
@ -461,13 +422,67 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
|
||||
dbesc($event_id),
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
if($r) {
|
||||
$r = q("update item set resource_type = '', resource_id = '' where resource_type = 'event' and resource_id = '%s' and uid = %d",
|
||||
|
||||
$sync_event['event_deleted'] = 1;
|
||||
build_sync_packet(0,array('event' => array($sync_event)));
|
||||
|
||||
$i = q("select * from item where resource_type = 'event' and resource_id = '%s' and uid = %d",
|
||||
dbesc($event_id),
|
||||
intval(local_channel())
|
||||
);
|
||||
$sync_event['event_deleted'] = 1;
|
||||
build_sync_packet(0,array('event' => array($sync_event)));
|
||||
|
||||
if ($i) {
|
||||
|
||||
$can_delete = false;
|
||||
$local_delete = true;
|
||||
|
||||
$ob_hash = get_observer_hash();
|
||||
if($ob_hash && ($ob_hash === $i[0]['author_xchan'] || $ob_hash === $i[0]['owner_xchan'] || $ob_hash === $i[0]['source_xchan'])) {
|
||||
$can_delete = true;
|
||||
}
|
||||
|
||||
// The site admin can delete any post/item on the site.
|
||||
// If the item originated on this site+channel the deletion will propagate downstream.
|
||||
// Otherwise just the local copy is removed.
|
||||
|
||||
if(is_site_admin()) {
|
||||
$local_delete = true;
|
||||
if(intval($i[0]['item_origin']))
|
||||
$can_delete = true;
|
||||
}
|
||||
|
||||
if($can_delete || $local_delete) {
|
||||
|
||||
// if this is a different page type or it's just a local delete
|
||||
// but not by the item author or owner, do a simple deletion
|
||||
|
||||
$complex = false;
|
||||
|
||||
if(intval($i[0]['item_type']) || ($local_delete && (! $can_delete))) {
|
||||
drop_item($i[0]['id']);
|
||||
}
|
||||
else {
|
||||
// complex deletion that needs to propagate and be performed in phases
|
||||
drop_item($i[0]['id'],true,DROPITEM_PHASE1);
|
||||
$complex = true;
|
||||
}
|
||||
|
||||
$ii = q("select * from item where id = %d",
|
||||
intval($i[0]['id'])
|
||||
);
|
||||
if($ii) {
|
||||
xchan_query($ii);
|
||||
$sync_item = fetch_post_tags($ii);
|
||||
build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true))));
|
||||
}
|
||||
|
||||
if($complex) {
|
||||
tag_deliver($i[0]['uid'],$i[0]['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
killme();
|
||||
}
|
||||
notice( t('Failed to remove event' ) . EOL);
|
||||
|
@ -8,8 +8,9 @@
|
||||
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use \Sabre\DAV as SDAV;
|
||||
use \Zotlabs\Storage;
|
||||
use Sabre\DAV as SDAV;
|
||||
use Zotlabs\Storage;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
require_once('include/attach.php');
|
||||
require_once('include/auth.php');
|
||||
@ -46,7 +47,7 @@ class Dav extends \Zotlabs\Web\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) {
|
||||
@ -69,7 +70,7 @@ class Dav extends \Zotlabs\Web\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;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ class Dirsearch extends \Zotlabs\Web\Controller {
|
||||
$quoted_string = false;
|
||||
}
|
||||
else
|
||||
$curr['value'] .= ' ' . trim(q);
|
||||
$curr['value'] .= ' ' . trim($q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class Embedphotos extends \Zotlabs\Web\Controller {
|
||||
$channel = \App::get_channel();
|
||||
$output = EMPTY_STR;
|
||||
if($channel) {
|
||||
$resolution = ((feature_enabled($channel['channel_id'],'large_photos')) ? 2 : 3);
|
||||
$resolution = ((feature_enabled($channel['channel_id'],'large_photos')) ? 1 : 2);
|
||||
$r = q("select mimetype, height, width from photo where resource_id = '%s' and $resolution = %d and uid = %d limit 1",
|
||||
dbesc($resource),
|
||||
intval($resolution),
|
||||
|
@ -11,6 +11,9 @@ require_once('include/html2plain.php');
|
||||
class Events extends \Zotlabs\Web\Controller {
|
||||
|
||||
function post() {
|
||||
|
||||
// this module is deprecated
|
||||
return;
|
||||
|
||||
logger('post: ' . print_r($_REQUEST,true), LOGGER_DATA);
|
||||
|
||||
@ -245,6 +248,9 @@ class Events extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
||||
function get() {
|
||||
|
||||
// this module is deprecated
|
||||
return;
|
||||
|
||||
if(argc() > 2 && argv(1) == 'ical') {
|
||||
$event_id = argv(2);
|
||||
@ -662,9 +668,10 @@ class Events extends \Zotlabs\Web\Controller {
|
||||
'html'=>$html,
|
||||
'plink' => array($rr['plink'],t('Link to Source'),'',''),
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($export) {
|
||||
header('Content-type: text/calendar');
|
||||
header('content-disposition: attachment; filename="' . t('calendar') . '-' . $channel['channel_address'] . '.ics"' );
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
/**
|
||||
* module: getfile
|
||||
*
|
||||
@ -46,7 +48,7 @@ class Getfile extends \Zotlabs\Web\Controller {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sigblock = \Zotlabs\Web\HTTPSig::parse_sigheader($_SERVER[$head]);
|
||||
$sigblock = HTTPSig::parse_sigheader($_SERVER[$head]);
|
||||
if($sigblock) {
|
||||
$keyId = $sigblock['keyId'];
|
||||
|
||||
@ -57,7 +59,7 @@ class Getfile extends \Zotlabs\Web\Controller {
|
||||
);
|
||||
if($r) {
|
||||
$hubloc = $r[0];
|
||||
$verified = \Zotlabs\Web\HTTPSig::verify('',$hubloc['xchan_pubkey']);
|
||||
$verified = HTTPSig::verify('',$hubloc['xchan_pubkey']);
|
||||
if($verified && $verified['header_signed'] && $verified['header_valid'] && $hash == $hubloc['hubloc_hash']) {
|
||||
$header_verified = true;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ class Group extends Controller {
|
||||
if($r)
|
||||
$result = group_rmv(local_channel(),$r[0]['gname']);
|
||||
if($result) {
|
||||
$hookinfo = [ 'pgrp_extras' => '', 'group'=>$argv(2) ];
|
||||
$hookinfo = [ 'pgrp_extras' => '', 'group' => argv(2) ];
|
||||
call_hooks ('privacygroup_extras_drop',$hookinfo);
|
||||
info( t('Privacy group removed.') . EOL);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ namespace Zotlabs\Module;
|
||||
use Zotlabs\Lib\Activity;
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\LDSignatures;
|
||||
use Zotlabs\Zot6\HTTPSig;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
use Zotlabs\Web\Controller;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
use Zotlabs\Lib\ThreadListener;
|
||||
|
@ -9,7 +9,7 @@ use Zotlabs\Daemon\Master;
|
||||
use Zotlabs\Lib\Activity;
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\LDSignatures;
|
||||
use Zotlabs\Zot6\HTTPSig;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
use Zotlabs\Lib\ThreadListener;
|
||||
use App;
|
||||
@ -96,11 +96,12 @@ class Item extends Controller {
|
||||
}
|
||||
|
||||
// if we don't have a parent id belonging to the signer see if we can obtain one as a visitor that we have permission to access
|
||||
// with a bias towards those items owned by channels on this site (item_wall = 1)
|
||||
|
||||
$sql_extra = item_permissions_sql(0);
|
||||
|
||||
if (! $i) {
|
||||
$i = q("select id as item_id from item where mid = '%s' $item_normal $sql_extra limit 1",
|
||||
$i = q("select id as item_id from item where mid = '%s' $item_normal $sql_extra order by item_wall desc limit 1",
|
||||
dbesc($r[0]['parent_mid'])
|
||||
);
|
||||
}
|
||||
@ -192,6 +193,25 @@ class Item extends Controller {
|
||||
killme();
|
||||
|
||||
}
|
||||
|
||||
if(argc() > 1 && argv(1) !== 'drop') {
|
||||
$x = q("select uid, item_wall, llink, mid from item where mid = '%s' ",
|
||||
dbesc(z_root() . '/item/' . argv(1))
|
||||
);
|
||||
if($x) {
|
||||
foreach($x as $xv) {
|
||||
if (intval($xv['item_wall'])) {
|
||||
$c = channelx_by_n($xv['uid']);
|
||||
if ($c) {
|
||||
goaway($c['xchan_url'] . '?mid=' . gen_link_id($xv['mid']));
|
||||
}
|
||||
}
|
||||
}
|
||||
goaway($x[0]['llink']);
|
||||
}
|
||||
http_status_exit(404, 'Not found');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -550,10 +570,10 @@ class Item extends Controller {
|
||||
$public_policy = $orig_post['public_policy'];
|
||||
$private = $orig_post['item_private'];
|
||||
}
|
||||
|
||||
if($private || $public_policy || $acl->is_private())
|
||||
$private = 1;
|
||||
|
||||
|
||||
if($public_policy || $acl->is_private()) {
|
||||
$private = (($private) ? $private : 1);
|
||||
}
|
||||
|
||||
$location = $orig_post['location'];
|
||||
$coord = $orig_post['coord'];
|
||||
@ -630,12 +650,11 @@ class Item extends Controller {
|
||||
|
||||
$allow_empty = ((array_key_exists('allow_empty',$_REQUEST)) ? intval($_REQUEST['allow_empty']) : 0);
|
||||
|
||||
$private = intval($acl->is_private() || ($public_policy));
|
||||
$private = (($private) ? $private : intval($acl->is_private() || ($public_policy)));
|
||||
|
||||
// If this is a comment, set the permissions from the parent.
|
||||
|
||||
if($parent_item) {
|
||||
$private = 0;
|
||||
$acl->set($parent_item);
|
||||
$private = intval($acl->is_private() || $parent_item['item_private']);
|
||||
$public_policy = $parent_item['public_policy'];
|
||||
@ -741,7 +760,12 @@ class Item extends Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(($str_contact_allow) && (! $str_group_allow)) {
|
||||
// direct message - private between individual channels but not groups
|
||||
$private = 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -2,9 +2,6 @@
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Linkinfo extends \Zotlabs\Web\Controller {
|
||||
|
||||
function get() {
|
||||
@ -48,7 +45,22 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
|
||||
logger('linkinfo: ' . $url);
|
||||
|
||||
|
||||
// Replace plink URL with 'share' tag if possible
|
||||
preg_match("/(mid=b64\.|display\/|posts\/)([\w\-]+)(&.+)?$/", $url, $mid);
|
||||
|
||||
if (!empty($mid) && $mid[1] == 'mid=b64.')
|
||||
$mid[2] = base64_decode($mid[2]);
|
||||
|
||||
$r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc((empty($mid) ? $url : $mid[2])),
|
||||
intval(local_channel())
|
||||
);
|
||||
if ($r) {
|
||||
echo "[share=" . $r[0]['id'] . "][/share]";
|
||||
killme();
|
||||
}
|
||||
|
||||
$result = z_fetch_url($url,false,0,array('novalidate' => true, 'nobody' => true));
|
||||
if($result['success']) {
|
||||
$hdrs=array();
|
||||
@ -275,7 +287,7 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
||||
// Check codepage in HTTP headers or HTML if not exist
|
||||
$cp = (preg_match('/Content-Type: text\/html; charset=(.+)\r\n/i', $header, $o) ? $o[1] : '');
|
||||
if(empty($cp))
|
||||
$cp = (preg_match('/meta.+content=["|\']text\/html; charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'AUTO');
|
||||
$cp = (preg_match('/meta.+content=["\']text\/html; charset=([^"\']+)/i', $body, $o) ? $o[1] : 'AUTO');
|
||||
|
||||
$body = mb_convert_encoding($body, 'UTF-8', $cp);
|
||||
$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8");
|
||||
@ -444,8 +456,9 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
||||
|
||||
while (strpos($text, " "))
|
||||
$text = trim(str_replace(" ", " ", $text));
|
||||
|
||||
$siteinfo["text"] = html_entity_decode(substr($text,0,350), ENT_QUOTES, "UTF-8").'...';
|
||||
|
||||
$text = substr(html_entity_decode($text, ENT_QUOTES, "UTF-8"), 0, 350);
|
||||
$siteinfo["text"] = rtrim(substr($text, 0, strrpos($text, " ")), "?.,:;!-") . '...';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Lockview extends \Zotlabs\Web\Controller {
|
||||
killme();
|
||||
}
|
||||
|
||||
if(($item['item_private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
|
||||
if(intval($item['item_private']) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
|
||||
&& (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
|
||||
|
||||
// if the post is private, but public_policy is blank ("visible to the internet"), and there aren't any
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
@require_once('include/zot.php');
|
||||
|
||||
|
||||
@ -152,10 +154,9 @@ class Magic extends \Zotlabs\Web\Controller {
|
||||
$headers['Accept'] = 'application/x-zot+json' ;
|
||||
$headers['X-Open-Web-Auth'] = random_string();
|
||||
$headers['Host'] = $parsed['host'];
|
||||
$headers['Digest'] = 'SHA-256=' . \Zotlabs\Web\HTTPSig::generate_digest($data,false);
|
||||
$headers['Digest'] = HTTPSig::generate_digest_header($data);
|
||||
|
||||
$headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'],
|
||||
'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512');
|
||||
$headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], 'acct:' . channel_reddress($channel),true,'sha512');
|
||||
$x = z_post_url($basepath . '/owa',$data,$redirects,[ 'headers' => $headers ]);
|
||||
|
||||
if($x['success']) {
|
||||
|
@ -25,6 +25,10 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
$expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE);
|
||||
$raw = ((x($_REQUEST,'raw')) ? intval($_REQUEST['raw']) : 0);
|
||||
$mimetype = ((x($_REQUEST,'mimetype')) ? notags(trim($_REQUEST['mimetype'])) : 'text/bbcode');
|
||||
|
||||
$sig = ((x($_REQUEST,'signature')) ? trim($_REQUEST['signature']) : '');
|
||||
if(strpos($sig,'b64.') === 0)
|
||||
$sig = base64_decode(str_replace('b64.', '', $sig));
|
||||
|
||||
if($preview) {
|
||||
|
||||
@ -123,7 +127,7 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
|
||||
// We have a local_channel, let send_message use the session channel and save a lookup
|
||||
|
||||
$ret = send_message(0, $recipient, $body, $subject, $replyto, $expires, $mimetype, $raw);
|
||||
$ret = send_message(0, $recipient, $body, $subject, $replyto, $expires, $mimetype, $raw, $sig);
|
||||
|
||||
if($ret['success']) {
|
||||
xchan_mail_query($ret['mail']);
|
||||
@ -396,8 +400,9 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
'can_recall' => ($channel['channel_hash'] == $message['from_xchan']),
|
||||
'is_recalled' => (intval($message['mail_recalled']) ? t('Message has been recalled.') : ''),
|
||||
'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'], 'c'),
|
||||
'sig' => base64_encode($message['sig'])
|
||||
);
|
||||
|
||||
|
||||
$seen = $message['seen'];
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
/**
|
||||
* OpenWebAuth verifier and token generator
|
||||
* See https://macgirvin.com/wiki/mike/OpenWebAuth/Home
|
||||
@ -25,7 +27,7 @@ class Owa extends \Zotlabs\Web\Controller {
|
||||
continue;
|
||||
}
|
||||
|
||||
$sigblock = \Zotlabs\Web\HTTPSig::parse_sigheader($_SERVER[$head]);
|
||||
$sigblock = HTTPSig::parse_sigheader($_SERVER[$head]);
|
||||
if($sigblock) {
|
||||
$keyId = $sigblock['keyId'];
|
||||
|
||||
@ -65,7 +67,7 @@ class Owa extends \Zotlabs\Web\Controller {
|
||||
|
||||
if ($r) {
|
||||
foreach($r as $hubloc) {
|
||||
$verified = \Zotlabs\Web\HTTPSig::verify(file_get_contents('php://input'),$hubloc['xchan_pubkey']);
|
||||
$verified = HTTPSig::verify(file_get_contents('php://input'),$hubloc['xchan_pubkey']);
|
||||
if($verified && $verified['header_signed'] && $verified['header_valid']) {
|
||||
logger('OWA header: ' . print_r($verified,true),LOGGER_DATA);
|
||||
logger('OWA success: ' . $hubloc['hubloc_addr'],LOGGER_DATA);
|
||||
|
@ -169,7 +169,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||
);
|
||||
call_hooks('cache_url_hook', $cache);
|
||||
if(! $cache['status']) {
|
||||
$url = htmlspecialchars_decode($r[0]['display_path']);
|
||||
$url = html_entity_decode($r[0]['display_path'], ENT_QUOTES);
|
||||
// SSLify if needed
|
||||
if(strpos(z_root(),'https:') !== false && strpos($url,'https:') === false)
|
||||
$url = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($url);
|
||||
@ -222,7 +222,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
||||
if(! $data)
|
||||
killme();
|
||||
|
||||
$etag = md5($data . $modified);
|
||||
$etag = '"' . md5($data . $modified) . '"';
|
||||
|
||||
if($modified == 0)
|
||||
$modified = time();
|
||||
|
@ -282,8 +282,8 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||
if(strpos($message, $tt['xname']) === 0)
|
||||
$message = substr($message, strlen($tt['xname']) + 1);
|
||||
|
||||
|
||||
$mid = basename($tt['link']);
|
||||
$mid = ((strpos($mid, 'b64.') === 0) ? @base64url_decode(substr($mid, 4)) : $mid);
|
||||
|
||||
if(in_array($tt['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
|
||||
// we need the thread parent
|
||||
@ -291,7 +291,6 @@ class Ping extends \Zotlabs\Web\Controller {
|
||||
dbesc($mid),
|
||||
intval(local_channel())
|
||||
);
|
||||
|
||||
$b64mid = ((strpos($r[0]['thr_parent'], 'b64.') === 0) ? $r[0]['thr_parent'] : 'b64.' . base64url_encode($r[0]['thr_parent']));
|
||||
}
|
||||
else {
|
||||
|
@ -38,8 +38,8 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
$observer_hash = (($observer) ? $observer['xchan_hash'] : '');
|
||||
|
||||
$o = '<div id="live-search"></div>' . "\r\n";
|
||||
|
||||
$o = '<div class="generic-content-wrapper-styled">' . "\r\n";
|
||||
|
||||
$o .= '<div class="generic-content-wrapper-styled">' . "\r\n";
|
||||
|
||||
$o .= '<h3>' . t('Search') . '</h3>';
|
||||
|
||||
|
@ -106,7 +106,7 @@ class Share extends \Zotlabs\Web\Controller {
|
||||
$arr['owner_xchan'] = $item['author_xchan'];
|
||||
$arr['obj'] = Activity::encode_item($item);
|
||||
$arr['obj_type'] = $item['obj_type'];
|
||||
$arr['verb'] = 'Announce';
|
||||
$arr['verb'] = ACTIVITY_SHARE;
|
||||
|
||||
$post = item_store($arr);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
class Zfinger extends \Zotlabs\Web\Controller {
|
||||
|
||||
@ -23,10 +24,9 @@ class Zfinger extends \Zotlabs\Web\Controller {
|
||||
$ret = json_encode($x);
|
||||
|
||||
if($chan) {
|
||||
$hash = \Zotlabs\Web\HTTPSig::generate_digest($ret,false);
|
||||
$headers['Digest'] = 'SHA-256=' . $hash;
|
||||
\Zotlabs\Web\HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],
|
||||
'acct:' . $chan['channel_address'] . '@' . \App::get_hostname(),true);
|
||||
$headers['Digest'] = HTTPSig::generate_digest_header($ret);
|
||||
$h = HTTPSig::create_sig($headers,$chan['channel_prvkey'],'acct:' . channel_reddress($chan));
|
||||
HTTPSig::set_headers($h);
|
||||
}
|
||||
else {
|
||||
foreach($headers as $k => $v) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace Zotlabs\Module;
|
||||
|
||||
use Zotlabs\Lib\Zotfinger;
|
||||
use Zotlabs\Zot6\HTTPSig;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
class Zot_probe extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
@ -502,14 +502,18 @@ abstract class PhotoDriver {
|
||||
*
|
||||
* @param array $arr
|
||||
* @param scale int
|
||||
* @return boolean|array
|
||||
* @return boolean
|
||||
*/
|
||||
public function storeThumbnail($arr, $scale = 0) {
|
||||
|
||||
|
||||
// We only process thumbnails here
|
||||
if($scale == 0)
|
||||
return false;
|
||||
|
||||
$arr['imgscale'] = $scale;
|
||||
|
||||
if(boolval(get_config('system','filesystem_storage_thumbnails', 0)) && $scale > 0) {
|
||||
$channel = \App::get_channel();
|
||||
if(boolval(get_config('system','filesystem_storage_thumbnails', 0))) {
|
||||
$channel = channelx_by_n($arr['uid']);
|
||||
$arr['os_storage'] = 1;
|
||||
$arr['os_syspath'] = 'store/' . $channel['channel_address'] . '/' . $arr['os_path'] . '-' . $scale;
|
||||
if(! $this->saveImage($arr['os_syspath']))
|
||||
|
@ -2,11 +2,17 @@
|
||||
|
||||
namespace Zotlabs\Web;
|
||||
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\Webfinger;
|
||||
use Zotlabs\Web\HTTPHeaders;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
|
||||
/**
|
||||
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-07.
|
||||
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-10.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-cavage-http-signatures-07
|
||||
* @see https://tools.ietf.org/html/draft-cavage-http-signatures-10
|
||||
*/
|
||||
|
||||
class HTTPSig {
|
||||
|
||||
/**
|
||||
@ -15,41 +21,32 @@ class HTTPSig {
|
||||
* @see https://tools.ietf.org/html/rfc5843
|
||||
*
|
||||
* @param string $body The value to create the digest for
|
||||
* @param boolean $set (optional, default true)
|
||||
* If set send a Digest HTTP header
|
||||
* @return string The generated digest of $body
|
||||
* @param string $alg hash algorithm (one of 'sha256','sha512')
|
||||
* @return string The generated digest header string for $body
|
||||
*/
|
||||
static function generate_digest($body, $set = true) {
|
||||
$digest = base64_encode(hash('sha256', $body, true));
|
||||
|
||||
if($set) {
|
||||
header('Digest: SHA-256=' . $digest);
|
||||
static function generate_digest_header($body,$alg = 'sha256') {
|
||||
|
||||
$digest = base64_encode(hash($alg, $body, true));
|
||||
switch($alg) {
|
||||
case 'sha512':
|
||||
return 'SHA-512=' . $digest;
|
||||
case 'sha256':
|
||||
default:
|
||||
return 'SHA-256=' . $digest;
|
||||
break;
|
||||
}
|
||||
return $digest;
|
||||
}
|
||||
|
||||
// See draft-cavage-http-signatures-08
|
||||
|
||||
static function verify($data,$key = '') {
|
||||
|
||||
$body = $data;
|
||||
$headers = null;
|
||||
$spoofable = false;
|
||||
|
||||
$result = [
|
||||
'signer' => '',
|
||||
'header_signed' => false,
|
||||
'header_valid' => false,
|
||||
'content_signed' => false,
|
||||
'content_valid' => false
|
||||
];
|
||||
static function find_headers($data,&$body) {
|
||||
|
||||
// decide if $data arrived via controller submission or curl
|
||||
|
||||
if(is_array($data) && $data['header']) {
|
||||
if(! $data['success'])
|
||||
return $result;
|
||||
return [];
|
||||
|
||||
$h = new \Zotlabs\Web\HTTPHeaders($data['header']);
|
||||
$h = new HTTPHeaders($data['header']);
|
||||
$headers = $h->fetcharr();
|
||||
$body = $data['body'];
|
||||
$headers['(request-target)'] = $data['request_target'];
|
||||
@ -57,9 +54,7 @@ class HTTPSig {
|
||||
|
||||
else {
|
||||
$headers = [];
|
||||
$headers['(request-target)'] =
|
||||
strtolower($_SERVER['REQUEST_METHOD']) . ' ' .
|
||||
$_SERVER['REQUEST_URI'];
|
||||
$headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
|
||||
$headers['content-type'] = $_SERVER['CONTENT_TYPE'];
|
||||
$headers['content-length'] = $_SERVER['CONTENT_LENGTH'];
|
||||
|
||||
@ -71,9 +66,35 @@ class HTTPSig {
|
||||
}
|
||||
}
|
||||
|
||||
// logger('SERVER: ' . print_r($_SERVER,true), LOGGER_ALL);
|
||||
//logger('SERVER: ' . print_r($_SERVER,true), LOGGER_ALL);
|
||||
|
||||
// logger('headers: ' . print_r($headers,true), LOGGER_ALL);
|
||||
//logger('headers: ' . print_r($headers,true), LOGGER_ALL);
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
|
||||
// See draft-cavage-http-signatures-10
|
||||
|
||||
static function verify($data,$key = '') {
|
||||
|
||||
$body = $data;
|
||||
$headers = null;
|
||||
|
||||
$result = [
|
||||
'signer' => '',
|
||||
'portable_id' => '',
|
||||
'header_signed' => false,
|
||||
'header_valid' => false,
|
||||
'content_signed' => false,
|
||||
'content_valid' => false
|
||||
];
|
||||
|
||||
|
||||
$headers = self::find_headers($data,$body);
|
||||
|
||||
if(! $headers)
|
||||
return $result;
|
||||
|
||||
$sig_block = null;
|
||||
|
||||
@ -85,7 +106,7 @@ class HTTPSig {
|
||||
}
|
||||
|
||||
if(! $sig_block) {
|
||||
logger('no signature provided.');
|
||||
logger('no signature provided.', LOGGER_DEBUG);
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -103,9 +124,6 @@ class HTTPSig {
|
||||
if(array_key_exists($h,$headers)) {
|
||||
$signed_data .= $h . ': ' . $headers[$h] . "\n";
|
||||
}
|
||||
if(strpos($h,'.')) {
|
||||
$spoofable = true;
|
||||
}
|
||||
if($h === 'date') {
|
||||
$d = new \DateTime($headers[$h]);
|
||||
$d->setTimeZone(new \DateTimeZone('UTC'));
|
||||
@ -128,63 +146,89 @@ class HTTPSig {
|
||||
$algorithm = 'sha512';
|
||||
}
|
||||
|
||||
if($key && function_exists($key)) {
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
$key = $key($sig_block['keyId']);
|
||||
}
|
||||
|
||||
if(! $key) {
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
$key = self::get_activitypub_key($sig_block['keyId']);
|
||||
}
|
||||
|
||||
if(! $key)
|
||||
if(! array_key_exists('keyId',$sig_block))
|
||||
return $result;
|
||||
|
||||
$x = rsa_verify($signed_data,$sig_block['signature'],$key,$algorithm);
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
|
||||
$key = self::get_key($key,$result['signer']);
|
||||
|
||||
if(! ($key && $key['public_key'])) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$x = rsa_verify($signed_data,$sig_block['signature'],$key['public_key'],$algorithm);
|
||||
|
||||
logger('verified: ' . $x, LOGGER_DEBUG);
|
||||
|
||||
if(! $x)
|
||||
if(! $x) {
|
||||
logger('verify failed for ' . $result['signer'] . ' alg=' . $algorithm . (($key['public_key']) ? '' : ' no key'));
|
||||
$sig_block['signature'] = base64_encode($sig_block['signature']);
|
||||
logger('affected sigblock: ' . print_r($sig_block,true));
|
||||
logger('signed_data: ' . print_r($signed_data,true));
|
||||
logger('headers: ' . print_r($headers,true));
|
||||
logger('server: ' . print_r($_SERVER,true));
|
||||
return $result;
|
||||
}
|
||||
|
||||
if(! $spoofable)
|
||||
$result['header_valid'] = true;
|
||||
$result['portable_id'] = $key['portable_id'];
|
||||
$result['header_valid'] = true;
|
||||
|
||||
if(in_array('digest',$signed_headers)) {
|
||||
$result['content_signed'] = true;
|
||||
$digest = explode('=', $headers['digest']);
|
||||
$digest = explode('=', $headers['digest'], 2);
|
||||
if($digest[0] === 'SHA-256')
|
||||
$hashalg = 'sha256';
|
||||
if($digest[0] === 'SHA-512')
|
||||
$hashalg = 'sha512';
|
||||
|
||||
// The explode operation will have stripped the '=' padding, so compare against unpadded base64
|
||||
if(rtrim(base64_encode(hash($hashalg,$body,true)),'=') === $digest[1]) {
|
||||
if(base64_encode(hash($hashalg,$body,true)) === $digest[1]) {
|
||||
$result['content_valid'] = true;
|
||||
}
|
||||
|
||||
logger('Content_Valid: ' . (($result['content_valid']) ? 'true' : 'false'));
|
||||
}
|
||||
|
||||
|
||||
if(in_array('x-zot-digest',$signed_headers)) {
|
||||
$result['content_signed'] = true;
|
||||
$digest = explode('=', $headers['x-zot-digest']);
|
||||
if($digest[0] === 'SHA-256')
|
||||
$hashalg = 'sha256';
|
||||
if($digest[0] === 'SHA-512')
|
||||
$hashalg = 'sha512';
|
||||
|
||||
// The explode operation will have stripped the '=' padding, so compare against unpadded base64
|
||||
if(rtrim(base64_encode(hash($hashalg,$_POST['data'],true)),'=') === $digest[1]) {
|
||||
$result['content_valid'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
logger('Content_Valid: ' . (($result['content_valid']) ? 'true' : 'false'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
static function get_key($key,$id) {
|
||||
|
||||
if($key) {
|
||||
if(function_exists($key)) {
|
||||
return $key($id);
|
||||
}
|
||||
return [ 'public_key' => $key ];
|
||||
}
|
||||
|
||||
if(strpos($id,'#') === false) {
|
||||
$key = self::get_webfinger_key($id);
|
||||
}
|
||||
|
||||
if(! $key) {
|
||||
$key = self::get_activitystreams_key($id);
|
||||
}
|
||||
|
||||
return $key;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function convertKey($key) {
|
||||
|
||||
if(strstr($key,'RSA ')) {
|
||||
return rsatopem($key);
|
||||
}
|
||||
elseif(substr($key,0,5) === 'data:') {
|
||||
return convert_salmon_key($key);
|
||||
}
|
||||
else {
|
||||
return $key;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
@ -192,57 +236,131 @@ class HTTPSig {
|
||||
* @return boolean|string
|
||||
* false if no pub key found, otherwise return the pub key
|
||||
*/
|
||||
function get_activitypub_key($id) {
|
||||
|
||||
if(strpos($id,'acct:') === 0) {
|
||||
$x = q("select xchan_pubkey from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$id))
|
||||
);
|
||||
}
|
||||
else {
|
||||
$x = q("select xchan_pubkey from xchan where xchan_hash = '%s' and xchan_network = 'activitypub' ",
|
||||
dbesc($id)
|
||||
);
|
||||
}
|
||||
function get_activitystreams_key($id) {
|
||||
|
||||
// remove fragment
|
||||
|
||||
$url = ((strpos($id,'#')) ? substr($id,0,strpos($id,'#')) : $id);
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$url)),
|
||||
dbesc($url)
|
||||
);
|
||||
|
||||
if($x && $x[0]['xchan_pubkey']) {
|
||||
return ($x[0]['xchan_pubkey']);
|
||||
return [ 'portable_id' => $x[0]['xchan_hash'], 'public_key' => $x[0]['xchan_pubkey'] , 'hubloc' => $x[0] ];
|
||||
}
|
||||
|
||||
if(function_exists('as_fetch'))
|
||||
$r = as_fetch($id);
|
||||
$r = ActivityStreams::fetch($id);
|
||||
|
||||
if($r) {
|
||||
$j = json_decode($r,true);
|
||||
if(array_key_exists('publicKey',$r) && array_key_exists('publicKeyPem',$r['publicKey']) && array_key_exists('id',$r['publicKey'])) {
|
||||
if($r['publicKey']['id'] === $id || $r['id'] === $id) {
|
||||
$portable_id = ((array_key_exists('owner',$r['publicKey'])) ? $r['publicKey']['owner'] : EMPTY_STR);
|
||||
return [ 'public_key' => self::convertKey($r['publicKey']['publicKeyPem']), 'portable_id' => $portable_id, 'hubloc' => [] ];
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(array_key_exists('publicKey',$j) && array_key_exists('publicKeyPem',$j['publicKey'])) {
|
||||
if((array_key_exists('id',$j['publicKey']) && $j['publicKey']['id'] !== $id) && $j['id'] !== $id)
|
||||
return false;
|
||||
|
||||
return($j['publicKey']['publicKeyPem']);
|
||||
function get_webfinger_key($id) {
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$id)),
|
||||
dbesc($id)
|
||||
);
|
||||
|
||||
if($x && $x[0]['xchan_pubkey']) {
|
||||
return [ 'portable_id' => $x[0]['xchan_hash'], 'public_key' => $x[0]['xchan_pubkey'] , 'hubloc' => $x[0] ];
|
||||
}
|
||||
|
||||
$wf = Webfinger::exec($id);
|
||||
$key = [ 'portable_id' => '', 'public_key' => '', 'hubloc' => [] ];
|
||||
|
||||
if($wf) {
|
||||
if(array_key_exists('properties',$wf) && array_key_exists('https://w3id.org/security/v1#publicKeyPem',$wf['properties'])) {
|
||||
$key['public_key'] = self::convertKey($wf['properties']['https://w3id.org/security/v1#publicKeyPem']);
|
||||
}
|
||||
if(array_key_exists('links', $wf) && is_array($wf['links'])) {
|
||||
foreach($wf['links'] as $l) {
|
||||
if(! (is_array($l) && array_key_exists('rel',$l))) {
|
||||
continue;
|
||||
}
|
||||
if($l['rel'] === 'magic-public-key' && array_key_exists('href',$l) && $key['public_key'] === EMPTY_STR) {
|
||||
$key['public_key'] = self::convertKey($l['href']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return (($key['public_key']) ? $key : false);
|
||||
}
|
||||
|
||||
|
||||
function get_zotfinger_key($id) {
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$id)),
|
||||
dbesc($id)
|
||||
);
|
||||
if($x && $x[0]['xchan_pubkey']) {
|
||||
return [ 'portable_id' => $x[0]['xchan_hash'], 'public_key' => $x[0]['xchan_pubkey'] , 'hubloc' => $x[0] ];
|
||||
}
|
||||
|
||||
$wf = Webfinger::exec($id);
|
||||
$key = [ 'portable_id' => '', 'public_key' => '', 'hubloc' => [] ];
|
||||
|
||||
if($wf) {
|
||||
if(array_key_exists('properties',$wf) && array_key_exists('https://w3id.org/security/v1#publicKeyPem',$wf['properties'])) {
|
||||
$key['public_key'] = self::convertKey($wf['properties']['https://w3id.org/security/v1#publicKeyPem']);
|
||||
}
|
||||
if(array_key_exists('links', $wf) && is_array($wf['links'])) {
|
||||
foreach($wf['links'] as $l) {
|
||||
if(! (is_array($l) && array_key_exists('rel',$l))) {
|
||||
continue;
|
||||
}
|
||||
if($l['rel'] === 'http://purl.org/zot/protocol/6.0' && array_key_exists('href',$l) && $l['href'] !== EMPTY_STR) {
|
||||
$z = \Zotlabs\Lib\Zotfinger::exec($l['href']);
|
||||
if($z) {
|
||||
$i = Libzot::import_xchan($z['data']);
|
||||
if($i['success']) {
|
||||
$key['portable_id'] = $i['hash'];
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' limit 1",
|
||||
dbesc($l['href'])
|
||||
);
|
||||
if($x) {
|
||||
$key['hubloc'] = $x[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($l['rel'] === 'magic-public-key' && array_key_exists('href',$l) && $key['public_key'] === EMPTY_STR) {
|
||||
$key['public_key'] = self::convertKey($l['href']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (($key['public_key']) ? $key : false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param string $request
|
||||
* @param array $head
|
||||
* @param string $prvkey
|
||||
* @param string $keyid (optional, default 'Key')
|
||||
* @param boolean $send_headers (optional, default false)
|
||||
* If set send a HTTP header
|
||||
* @param string $keyid (optional, default '')
|
||||
* @param boolean $auth (optional, default false)
|
||||
* @param string $alg (optional, default 'sha256')
|
||||
* @param string $crypt_key (optional, default null)
|
||||
* @param string $crypt_algo (optional, default 'aes256ctr')
|
||||
* @param array $encryption [ 'key', 'algorithm' ] or false
|
||||
* @return array
|
||||
*/
|
||||
static function create_sig($request, $head, $prvkey, $keyid = 'Key', $send_headers = false, $auth = false,
|
||||
$alg = 'sha256', $crypt_key = null, $crypt_algo = 'aes256ctr') {
|
||||
static function create_sig($head, $prvkey, $keyid = EMPTY_STR, $auth = false, $alg = 'sha256', $encryption = false ) {
|
||||
|
||||
$return_headers = [];
|
||||
|
||||
@ -253,14 +371,15 @@ class HTTPSig {
|
||||
$algorithm = 'rsa-sha512';
|
||||
}
|
||||
|
||||
$x = self::sign($request,$head,$prvkey,$alg);
|
||||
$x = self::sign($head,$prvkey,$alg);
|
||||
|
||||
$headerval = 'keyId="' . $keyid . '",algorithm="' . $algorithm
|
||||
. '",headers="' . $x['headers'] . '",signature="' . $x['signature'] . '"';
|
||||
$headerval = 'keyId="' . $keyid . '",algorithm="' . $algorithm . '",headers="' . $x['headers'] . '",signature="' . $x['signature'] . '"';
|
||||
|
||||
if($crypt_key) {
|
||||
$x = crypto_encapsulate($headerval,$crypt_key,$crypt_algo);
|
||||
$headerval = 'iv="' . $x['iv'] . '",key="' . $x['key'] . '",alg="' . $x['alg'] . '",data="' . $x['data'] . '"';
|
||||
if($encryption) {
|
||||
$x = crypto_encapsulate($headerval,$encryption['key'],$encryption['algorithm']);
|
||||
if(is_array($x)) {
|
||||
$headerval = 'iv="' . $x['iv'] . '",key="' . $x['key'] . '",alg="' . $x['alg'] . '",data="' . $x['data'] . '"';
|
||||
}
|
||||
}
|
||||
|
||||
if($auth) {
|
||||
@ -272,43 +391,52 @@ class HTTPSig {
|
||||
|
||||
if($head) {
|
||||
foreach($head as $k => $v) {
|
||||
if($send_headers) {
|
||||
header($k . ': ' . $v);
|
||||
}
|
||||
else {
|
||||
$return_headers[] = $k . ': ' . $v;
|
||||
// strip the request-target virtual header from the output headers
|
||||
if($k === '(request-target)') {
|
||||
continue;
|
||||
}
|
||||
$return_headers[] = $k . ': ' . $v;
|
||||
}
|
||||
}
|
||||
if($send_headers) {
|
||||
header($sighead);
|
||||
}
|
||||
else {
|
||||
$return_headers[] = $sighead;
|
||||
}
|
||||
$return_headers[] = $sighead;
|
||||
|
||||
return $return_headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set headers
|
||||
*
|
||||
* @param array $headers
|
||||
* @return void
|
||||
*/
|
||||
|
||||
|
||||
static function set_headers($headers) {
|
||||
if($headers && is_array($headers)) {
|
||||
foreach($headers as $h) {
|
||||
header($h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param string $request
|
||||
* @param array $head
|
||||
* @param string $prvkey
|
||||
* @param string $alg (optional) default 'sha256'
|
||||
* @return array
|
||||
*/
|
||||
static function sign($request, $head, $prvkey, $alg = 'sha256') {
|
||||
|
||||
static function sign($head, $prvkey, $alg = 'sha256') {
|
||||
|
||||
$ret = [];
|
||||
|
||||
$headers = '';
|
||||
$fields = '';
|
||||
if($request) {
|
||||
$headers = '(request-target)' . ': ' . trim($request) . "\n";
|
||||
$fields = '(request-target)';
|
||||
}
|
||||
|
||||
logger('signing: ' . print_r($head,true), LOGGER_DATA);
|
||||
|
||||
if($head) {
|
||||
foreach($head as $k => $v) {
|
||||
@ -340,11 +468,8 @@ class HTTPSig {
|
||||
* - \e array \b headers
|
||||
* - \e string \b signature
|
||||
*/
|
||||
static function parse_sigheader($header) {
|
||||
|
||||
if(is_array($header)) {
|
||||
btlogger('is_array: ' . print_r($header,true));
|
||||
}
|
||||
static function parse_sigheader($header) {
|
||||
|
||||
$ret = [];
|
||||
$matches = [];
|
||||
@ -381,6 +506,7 @@ class HTTPSig {
|
||||
* - \e string \b alg
|
||||
* - \e string \b data
|
||||
*/
|
||||
|
||||
static function decrypt_sigheader($header, $prvkey = null) {
|
||||
|
||||
$iv = $key = $alg = $data = null;
|
||||
|
@ -18,10 +18,9 @@ class Categories {
|
||||
|
||||
$articles = ((array_key_exists('articles',$arr) && $arr['articles']) ? true : false);
|
||||
|
||||
if(($articles) && (! feature_enabled(App::$profile['profile_uid'],'articles')))
|
||||
if(($articles) && (! Apps::system_app_installed(App::$profile['profile_uid'],'Articles')))
|
||||
return '';
|
||||
|
||||
|
||||
if((! App::$profile['profile_uid'])
|
||||
|| (! perm_is_allowed(App::$profile['profile_uid'],get_observer_hash(),(($cards || $articles) ? 'view_pages' : 'view_stream')))) {
|
||||
return '';
|
||||
|
@ -69,7 +69,7 @@ class Notifications {
|
||||
'label' => t('New Events'),
|
||||
'title' => t('New Events Notifications'),
|
||||
'viewall' => [
|
||||
'url' => 'events',
|
||||
'url' => 'cdav/calendar',
|
||||
'label' => t('View events')
|
||||
],
|
||||
'markall' => [
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Zot;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
/**
|
||||
* @brief Finger
|
||||
*
|
||||
@ -95,8 +97,7 @@ class Finger {
|
||||
$headers['X-Zot-Nonce'] = random_string();
|
||||
$headers['Host'] = $parsed_host;
|
||||
|
||||
$xhead = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'],
|
||||
'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false);
|
||||
$xhead = HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel));
|
||||
|
||||
$retries = 0;
|
||||
|
||||
@ -129,7 +130,7 @@ class Finger {
|
||||
|
||||
$x = json_decode($result['body'], true);
|
||||
|
||||
$verify = \Zotlabs\Web\HTTPSig::verify($result,(($x) ? $x['key'] : ''));
|
||||
$verify = HTTPSig::verify($result,(($x) ? $x['key'] : ''));
|
||||
|
||||
if($x && (! $verify['header_valid'])) {
|
||||
$signed_token = ((is_array($x) && array_key_exists('signed_token', $x)) ? $x['signed_token'] : null);
|
||||
|
@ -88,8 +88,7 @@ class Finger {
|
||||
$headers = [];
|
||||
$headers['X-Zot-Channel'] = $channel['channel_address'] . '@' . \App::get_hostname();
|
||||
$headers['X-Zot-Nonce'] = random_string();
|
||||
$xhead = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'],
|
||||
'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false);
|
||||
$xhead = HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel));
|
||||
|
||||
$retries = 0;
|
||||
|
||||
@ -122,7 +121,7 @@ class Finger {
|
||||
|
||||
$x = json_decode($result['body'], true);
|
||||
|
||||
$verify = \Zotlabs\Web\HTTPSig::verify($result,(($x) ? $x['key'] : ''));
|
||||
$verify = HTTPSig::verify($result,(($x) ? $x['key'] : ''));
|
||||
|
||||
if($x && (! $verify['header_valid'])) {
|
||||
$signed_token = ((is_array($x) && array_key_exists('signed_token', $x)) ? $x['signed_token'] : null);
|
||||
|
@ -1,536 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Zot6;
|
||||
|
||||
use Zotlabs\Lib\ActivityStreams;
|
||||
use Zotlabs\Lib\Webfinger;
|
||||
use Zotlabs\Web\HTTPHeaders;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
|
||||
/**
|
||||
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-10.
|
||||
*
|
||||
* @see https://tools.ietf.org/html/draft-cavage-http-signatures-10
|
||||
*/
|
||||
|
||||
class HTTPSig {
|
||||
|
||||
/**
|
||||
* @brief RFC5843
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc5843
|
||||
*
|
||||
* @param string $body The value to create the digest for
|
||||
* @param string $alg hash algorithm (one of 'sha256','sha512')
|
||||
* @return string The generated digest header string for $body
|
||||
*/
|
||||
|
||||
static function generate_digest_header($body,$alg = 'sha256') {
|
||||
|
||||
$digest = base64_encode(hash($alg, $body, true));
|
||||
switch($alg) {
|
||||
case 'sha512':
|
||||
return 'SHA-512=' . $digest;
|
||||
case 'sha256':
|
||||
default:
|
||||
return 'SHA-256=' . $digest;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static function find_headers($data,&$body) {
|
||||
|
||||
// decide if $data arrived via controller submission or curl
|
||||
|
||||
if(is_array($data) && $data['header']) {
|
||||
if(! $data['success'])
|
||||
return [];
|
||||
|
||||
$h = new HTTPHeaders($data['header']);
|
||||
$headers = $h->fetcharr();
|
||||
$body = $data['body'];
|
||||
$headers['(request-target)'] = $data['request_target'];
|
||||
}
|
||||
|
||||
else {
|
||||
$headers = [];
|
||||
$headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
|
||||
$headers['content-type'] = $_SERVER['CONTENT_TYPE'];
|
||||
$headers['content-length'] = $_SERVER['CONTENT_LENGTH'];
|
||||
|
||||
foreach($_SERVER as $k => $v) {
|
||||
if(strpos($k,'HTTP_') === 0) {
|
||||
$field = str_replace('_','-',strtolower(substr($k,5)));
|
||||
$headers[$field] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//logger('SERVER: ' . print_r($_SERVER,true), LOGGER_ALL);
|
||||
|
||||
//logger('headers: ' . print_r($headers,true), LOGGER_ALL);
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
|
||||
// See draft-cavage-http-signatures-10
|
||||
|
||||
static function verify($data,$key = '') {
|
||||
|
||||
$body = $data;
|
||||
$headers = null;
|
||||
|
||||
$result = [
|
||||
'signer' => '',
|
||||
'portable_id' => '',
|
||||
'header_signed' => false,
|
||||
'header_valid' => false,
|
||||
'content_signed' => false,
|
||||
'content_valid' => false
|
||||
];
|
||||
|
||||
|
||||
$headers = self::find_headers($data,$body);
|
||||
|
||||
if(! $headers)
|
||||
return $result;
|
||||
|
||||
$sig_block = null;
|
||||
|
||||
if(array_key_exists('signature',$headers)) {
|
||||
$sig_block = self::parse_sigheader($headers['signature']);
|
||||
}
|
||||
elseif(array_key_exists('authorization',$headers)) {
|
||||
$sig_block = self::parse_sigheader($headers['authorization']);
|
||||
}
|
||||
|
||||
if(! $sig_block) {
|
||||
logger('no signature provided.', LOGGER_DEBUG);
|
||||
return $result;
|
||||
}
|
||||
|
||||
// Warning: This log statement includes binary data
|
||||
// logger('sig_block: ' . print_r($sig_block,true), LOGGER_DATA);
|
||||
|
||||
$result['header_signed'] = true;
|
||||
|
||||
$signed_headers = $sig_block['headers'];
|
||||
if(! $signed_headers)
|
||||
$signed_headers = [ 'date' ];
|
||||
|
||||
$signed_data = '';
|
||||
foreach($signed_headers as $h) {
|
||||
if(array_key_exists($h,$headers)) {
|
||||
$signed_data .= $h . ': ' . $headers[$h] . "\n";
|
||||
}
|
||||
if($h === 'date') {
|
||||
$d = new \DateTime($headers[$h]);
|
||||
$d->setTimeZone(new \DateTimeZone('UTC'));
|
||||
$dplus = datetime_convert('UTC','UTC','now + 1 day');
|
||||
$dminus = datetime_convert('UTC','UTC','now - 1 day');
|
||||
$c = $d->format('Y-m-d H:i:s');
|
||||
if($c > $dplus || $c < $dminus) {
|
||||
logger('bad time: ' . $c);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
$signed_data = rtrim($signed_data,"\n");
|
||||
|
||||
$algorithm = null;
|
||||
if($sig_block['algorithm'] === 'rsa-sha256') {
|
||||
$algorithm = 'sha256';
|
||||
}
|
||||
if($sig_block['algorithm'] === 'rsa-sha512') {
|
||||
$algorithm = 'sha512';
|
||||
}
|
||||
|
||||
if(! array_key_exists('keyId',$sig_block))
|
||||
return $result;
|
||||
|
||||
$result['signer'] = $sig_block['keyId'];
|
||||
|
||||
$key = self::get_key($key,$result['signer']);
|
||||
|
||||
if(! ($key && $key['public_key'])) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$x = rsa_verify($signed_data,$sig_block['signature'],$key['public_key'],$algorithm);
|
||||
|
||||
logger('verified: ' . $x, LOGGER_DEBUG);
|
||||
|
||||
if(! $x) {
|
||||
logger('verify failed for ' . $result['signer'] . ' alg=' . $algorithm . (($key['public_key']) ? '' : ' no key'));
|
||||
$sig_block['signature'] = base64_encode($sig_block['signature']);
|
||||
logger('affected sigblock: ' . print_r($sig_block,true));
|
||||
logger('signed_data: ' . print_r($signed_data,true));
|
||||
logger('headers: ' . print_r($headers,true));
|
||||
logger('server: ' . print_r($_SERVER,true));
|
||||
return $result;
|
||||
}
|
||||
|
||||
$result['portable_id'] = $key['portable_id'];
|
||||
$result['header_valid'] = true;
|
||||
|
||||
if(in_array('digest',$signed_headers)) {
|
||||
$result['content_signed'] = true;
|
||||
$digest = explode('=', $headers['digest'], 2);
|
||||
if($digest[0] === 'SHA-256')
|
||||
$hashalg = 'sha256';
|
||||
if($digest[0] === 'SHA-512')
|
||||
$hashalg = 'sha512';
|
||||
|
||||
if(base64_encode(hash($hashalg,$body,true)) === $digest[1]) {
|
||||
$result['content_valid'] = true;
|
||||
}
|
||||
|
||||
logger('Content_Valid: ' . (($result['content_valid']) ? 'true' : 'false'));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
static function get_key($key,$id) {
|
||||
|
||||
if($key) {
|
||||
if(function_exists($key)) {
|
||||
return $key($id);
|
||||
}
|
||||
return [ 'public_key' => $key ];
|
||||
}
|
||||
|
||||
if(strpos($id,'#') === false) {
|
||||
$key = self::get_webfinger_key($id);
|
||||
}
|
||||
|
||||
if(! $key) {
|
||||
$key = self::get_activitystreams_key($id);
|
||||
}
|
||||
|
||||
return $key;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function convertKey($key) {
|
||||
|
||||
if(strstr($key,'RSA ')) {
|
||||
return rsatopem($key);
|
||||
}
|
||||
elseif(substr($key,0,5) === 'data:') {
|
||||
return convert_salmon_key($key);
|
||||
}
|
||||
else {
|
||||
return $key;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param string $id
|
||||
* @return boolean|string
|
||||
* false if no pub key found, otherwise return the pub key
|
||||
*/
|
||||
|
||||
function get_activitystreams_key($id) {
|
||||
|
||||
// remove fragment
|
||||
|
||||
$url = ((strpos($id,'#')) ? substr($id,0,strpos($id,'#')) : $id);
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$url)),
|
||||
dbesc($url)
|
||||
);
|
||||
|
||||
if($x && $x[0]['xchan_pubkey']) {
|
||||
return [ 'portable_id' => $x[0]['xchan_hash'], 'public_key' => $x[0]['xchan_pubkey'] , 'hubloc' => $x[0] ];
|
||||
}
|
||||
|
||||
$r = ActivityStreams::fetch($id);
|
||||
|
||||
if($r) {
|
||||
if(array_key_exists('publicKey',$r) && array_key_exists('publicKeyPem',$r['publicKey']) && array_key_exists('id',$r['publicKey'])) {
|
||||
if($r['publicKey']['id'] === $id || $r['id'] === $id) {
|
||||
$portable_id = ((array_key_exists('owner',$r['publicKey'])) ? $r['publicKey']['owner'] : EMPTY_STR);
|
||||
return [ 'public_key' => self::convertKey($r['publicKey']['publicKeyPem']), 'portable_id' => $portable_id, 'hubloc' => [] ];
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function get_webfinger_key($id) {
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$id)),
|
||||
dbesc($id)
|
||||
);
|
||||
|
||||
if($x && $x[0]['xchan_pubkey']) {
|
||||
return [ 'portable_id' => $x[0]['xchan_hash'], 'public_key' => $x[0]['xchan_pubkey'] , 'hubloc' => $x[0] ];
|
||||
}
|
||||
|
||||
$wf = Webfinger::exec($id);
|
||||
$key = [ 'portable_id' => '', 'public_key' => '', 'hubloc' => [] ];
|
||||
|
||||
if($wf) {
|
||||
if(array_key_exists('properties',$wf) && array_key_exists('https://w3id.org/security/v1#publicKeyPem',$wf['properties'])) {
|
||||
$key['public_key'] = self::convertKey($wf['properties']['https://w3id.org/security/v1#publicKeyPem']);
|
||||
}
|
||||
if(array_key_exists('links', $wf) && is_array($wf['links'])) {
|
||||
foreach($wf['links'] as $l) {
|
||||
if(! (is_array($l) && array_key_exists('rel',$l))) {
|
||||
continue;
|
||||
}
|
||||
if($l['rel'] === 'magic-public-key' && array_key_exists('href',$l) && $key['public_key'] === EMPTY_STR) {
|
||||
$key['public_key'] = self::convertKey($l['href']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (($key['public_key']) ? $key : false);
|
||||
}
|
||||
|
||||
|
||||
function get_zotfinger_key($id) {
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_addr = '%s' or hubloc_id_url = '%s' limit 1",
|
||||
dbesc(str_replace('acct:','',$id)),
|
||||
dbesc($id)
|
||||
);
|
||||
if($x && $x[0]['xchan_pubkey']) {
|
||||
return [ 'portable_id' => $x[0]['xchan_hash'], 'public_key' => $x[0]['xchan_pubkey'] , 'hubloc' => $x[0] ];
|
||||
}
|
||||
|
||||
$wf = Webfinger::exec($id);
|
||||
$key = [ 'portable_id' => '', 'public_key' => '', 'hubloc' => [] ];
|
||||
|
||||
if($wf) {
|
||||
if(array_key_exists('properties',$wf) && array_key_exists('https://w3id.org/security/v1#publicKeyPem',$wf['properties'])) {
|
||||
$key['public_key'] = self::convertKey($wf['properties']['https://w3id.org/security/v1#publicKeyPem']);
|
||||
}
|
||||
if(array_key_exists('links', $wf) && is_array($wf['links'])) {
|
||||
foreach($wf['links'] as $l) {
|
||||
if(! (is_array($l) && array_key_exists('rel',$l))) {
|
||||
continue;
|
||||
}
|
||||
if($l['rel'] === 'http://purl.org/zot/protocol/6.0' && array_key_exists('href',$l) && $l['href'] !== EMPTY_STR) {
|
||||
$z = \Zotlabs\Lib\Zotfinger::exec($l['href']);
|
||||
if($z) {
|
||||
$i = Libzot::import_xchan($z['data']);
|
||||
if($i['success']) {
|
||||
$key['portable_id'] = $i['hash'];
|
||||
|
||||
$x = q("select * from xchan left join hubloc on xchan_hash = hubloc_hash where hubloc_id_url = '%s' limit 1",
|
||||
dbesc($l['href'])
|
||||
);
|
||||
if($x) {
|
||||
$key['hubloc'] = $x[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($l['rel'] === 'magic-public-key' && array_key_exists('href',$l) && $key['public_key'] === EMPTY_STR) {
|
||||
$key['public_key'] = self::convertKey($l['href']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (($key['public_key']) ? $key : false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param array $head
|
||||
* @param string $prvkey
|
||||
* @param string $keyid (optional, default '')
|
||||
* @param boolean $auth (optional, default false)
|
||||
* @param string $alg (optional, default 'sha256')
|
||||
* @param array $encryption [ 'key', 'algorithm' ] or false
|
||||
* @return array
|
||||
*/
|
||||
static function create_sig($head, $prvkey, $keyid = EMPTY_STR, $auth = false, $alg = 'sha256', $encryption = false ) {
|
||||
|
||||
$return_headers = [];
|
||||
|
||||
if($alg === 'sha256') {
|
||||
$algorithm = 'rsa-sha256';
|
||||
}
|
||||
if($alg === 'sha512') {
|
||||
$algorithm = 'rsa-sha512';
|
||||
}
|
||||
|
||||
$x = self::sign($head,$prvkey,$alg);
|
||||
|
||||
$headerval = 'keyId="' . $keyid . '",algorithm="' . $algorithm . '",headers="' . $x['headers'] . '",signature="' . $x['signature'] . '"';
|
||||
|
||||
if($encryption) {
|
||||
$x = crypto_encapsulate($headerval,$encryption['key'],$encryption['algorithm']);
|
||||
if(is_array($x)) {
|
||||
$headerval = 'iv="' . $x['iv'] . '",key="' . $x['key'] . '",alg="' . $x['alg'] . '",data="' . $x['data'] . '"';
|
||||
}
|
||||
}
|
||||
|
||||
if($auth) {
|
||||
$sighead = 'Authorization: Signature ' . $headerval;
|
||||
}
|
||||
else {
|
||||
$sighead = 'Signature: ' . $headerval;
|
||||
}
|
||||
|
||||
if($head) {
|
||||
foreach($head as $k => $v) {
|
||||
// strip the request-target virtual header from the output headers
|
||||
if($k === '(request-target)') {
|
||||
continue;
|
||||
}
|
||||
$return_headers[] = $k . ': ' . $v;
|
||||
}
|
||||
}
|
||||
$return_headers[] = $sighead;
|
||||
|
||||
return $return_headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief set headers
|
||||
*
|
||||
* @param array $headers
|
||||
* @return void
|
||||
*/
|
||||
|
||||
|
||||
static function set_headers($headers) {
|
||||
if($headers && is_array($headers)) {
|
||||
foreach($headers as $h) {
|
||||
header($h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param array $head
|
||||
* @param string $prvkey
|
||||
* @param string $alg (optional) default 'sha256'
|
||||
* @return array
|
||||
*/
|
||||
|
||||
static function sign($head, $prvkey, $alg = 'sha256') {
|
||||
|
||||
$ret = [];
|
||||
|
||||
$headers = '';
|
||||
$fields = '';
|
||||
|
||||
logger('signing: ' . print_r($head,true), LOGGER_DATA);
|
||||
|
||||
if($head) {
|
||||
foreach($head as $k => $v) {
|
||||
$headers .= strtolower($k) . ': ' . trim($v) . "\n";
|
||||
if($fields)
|
||||
$fields .= ' ';
|
||||
|
||||
$fields .= strtolower($k);
|
||||
}
|
||||
// strip the trailing linefeed
|
||||
$headers = rtrim($headers,"\n");
|
||||
}
|
||||
|
||||
$sig = base64_encode(rsa_sign($headers,$prvkey,$alg));
|
||||
|
||||
$ret['headers'] = $fields;
|
||||
$ret['signature'] = $sig;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param string $header
|
||||
* @return array associate array with
|
||||
* - \e string \b keyID
|
||||
* - \e string \b algorithm
|
||||
* - \e array \b headers
|
||||
* - \e string \b signature
|
||||
*/
|
||||
|
||||
static function parse_sigheader($header) {
|
||||
|
||||
$ret = [];
|
||||
$matches = [];
|
||||
|
||||
// if the header is encrypted, decrypt with (default) site private key and continue
|
||||
|
||||
if(preg_match('/iv="(.*?)"/ism',$header,$matches))
|
||||
$header = self::decrypt_sigheader($header);
|
||||
|
||||
if(preg_match('/keyId="(.*?)"/ism',$header,$matches))
|
||||
$ret['keyId'] = $matches[1];
|
||||
if(preg_match('/algorithm="(.*?)"/ism',$header,$matches))
|
||||
$ret['algorithm'] = $matches[1];
|
||||
if(preg_match('/headers="(.*?)"/ism',$header,$matches))
|
||||
$ret['headers'] = explode(' ', $matches[1]);
|
||||
if(preg_match('/signature="(.*?)"/ism',$header,$matches))
|
||||
$ret['signature'] = base64_decode(preg_replace('/\s+/','',$matches[1]));
|
||||
|
||||
if(($ret['signature']) && ($ret['algorithm']) && (! $ret['headers']))
|
||||
$ret['headers'] = [ 'date' ];
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param string $header
|
||||
* @param string $prvkey (optional), if not set use site private key
|
||||
* @return array|string associative array, empty string if failue
|
||||
* - \e string \b iv
|
||||
* - \e string \b key
|
||||
* - \e string \b alg
|
||||
* - \e string \b data
|
||||
*/
|
||||
|
||||
static function decrypt_sigheader($header, $prvkey = null) {
|
||||
|
||||
$iv = $key = $alg = $data = null;
|
||||
|
||||
if(! $prvkey) {
|
||||
$prvkey = get_config('system', 'prvkey');
|
||||
}
|
||||
|
||||
$matches = [];
|
||||
|
||||
if(preg_match('/iv="(.*?)"/ism',$header,$matches))
|
||||
$iv = $matches[1];
|
||||
if(preg_match('/key="(.*?)"/ism',$header,$matches))
|
||||
$key = $matches[1];
|
||||
if(preg_match('/alg="(.*?)"/ism',$header,$matches))
|
||||
$alg = $matches[1];
|
||||
if(preg_match('/data="(.*?)"/ism',$header,$matches))
|
||||
$data = $matches[1];
|
||||
|
||||
if($iv && $key && $alg && $data) {
|
||||
return crypto_unencapsulate([ 'encrypted' => true, 'iv' => $iv, 'key' => $key, 'alg' => $alg, 'data' => $data ] , $prvkey);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ namespace Zotlabs\Zot6;
|
||||
|
||||
use Zotlabs\Lib\Config;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
|
||||
class Receiver {
|
||||
@ -193,7 +194,9 @@ class Receiver {
|
||||
case 'response': // upstream message
|
||||
case 'sync':
|
||||
default:
|
||||
$this->response = $this->handler->Notify($this->data,$this->hub);
|
||||
if ($this->sender) {
|
||||
$this->response = $this->handler->Notify($this->data,$this->hub);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
50
boot.php
50
boot.php
@ -50,7 +50,7 @@ require_once('include/attach.php');
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||
define ( 'STD_VERSION', '4.3' );
|
||||
define ( 'STD_VERSION', '4.5' );
|
||||
define ( 'ZOT_REVISION', '6.0a' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1234 );
|
||||
@ -84,7 +84,8 @@ define ( 'DIRECTORY_FALLBACK_MASTER', 'https://zotadel.net');
|
||||
|
||||
$DIRECTORY_FALLBACK_SERVERS = array(
|
||||
'https://zotadel.net',
|
||||
'https://zotsite.net'
|
||||
'https://zotsite.net',
|
||||
'https://hub.netzgemeinde.eu'
|
||||
);
|
||||
|
||||
|
||||
@ -467,7 +468,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' );
|
||||
|
||||
define ( 'ACTIVITYSTREAMS_JSONLD_REV', 'https://www.w3.org/ns/activitystreams' );
|
||||
|
||||
define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.4' );
|
||||
define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.8' );
|
||||
/**
|
||||
* activity stream defines
|
||||
*/
|
||||
@ -895,6 +896,49 @@ class App {
|
||||
if(x($_GET,'q'))
|
||||
self::$cmd = escape_tags(trim($_GET['q'],'/\\'));
|
||||
|
||||
// Serve raw files from the file system in certain cases.
|
||||
$filext = pathinfo(self::$cmd, PATHINFO_EXTENSION);
|
||||
|
||||
$serve_rawfiles=[
|
||||
'jpg'=>'image/jpeg',
|
||||
'jpeg'=>'image/jpeg',
|
||||
'gif'=>'image/gif',
|
||||
'png'=>'image/png',
|
||||
'ico'=>'image/vnd.microsoft.icon',
|
||||
'css'=>'text/css',
|
||||
'js'=>'text/javascript',
|
||||
'htm'=>'text/html',
|
||||
'html'=>'text/html',
|
||||
'map'=>'application/octet-stream',
|
||||
'ttf'=>'font/ttf',
|
||||
'woff'=>'font/woff',
|
||||
'woff2'=>'font/woff2',
|
||||
'svg'=>'image/svg+xml'];
|
||||
|
||||
if (array_key_exists($filext, $serve_rawfiles) && file_exists(self::$cmd)) {
|
||||
$staticfilecwd = getcwd();
|
||||
$staticfilerealpath = realpath(self::$cmd);
|
||||
if(strpos($staticfilerealpath,$staticfilecwd) !== 0) {
|
||||
http_status_exit(404,'not found');
|
||||
}
|
||||
|
||||
$staticfileetag = '"'.md5($staticfilerealpath.filemtime(self::$cmd)).'"';
|
||||
header("ETag: ".$staticfileetag);
|
||||
header("Cache-control: max-age=2592000");
|
||||
if(isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
|
||||
// If HTTP_IF_NONE_MATCH is same as the generated ETag => content is the same as browser cache
|
||||
// So send a 304 Not Modified response header and exit
|
||||
if($_SERVER['HTTP_IF_NONE_MATCH'] == $staticfileetag) {
|
||||
http_status_exit(304,'not modified');
|
||||
}
|
||||
}
|
||||
header("Content-type: ".$serve_rawfiles[$filext]);
|
||||
$handle = fopen(self::$cmd, "rb");
|
||||
fpassthru($handle);
|
||||
fclose($handle);
|
||||
killme();
|
||||
}
|
||||
|
||||
// unix style "homedir"
|
||||
|
||||
if((substr(self::$cmd, 0, 1) === '~') || (substr(self::$cmd, 0, 1) === '@'))
|
||||
|
22
composer.lock
generated
22
composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "blueimp/jquery-file-upload",
|
||||
"version": "v9.30.0",
|
||||
"version": "v9.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558"
|
||||
"reference": "2485bf016e1085f0cd8308723064458cb0af5729"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/2485bf016e1085f0cd8308723064458cb0af5729",
|
||||
"reference": "2485bf016e1085f0cd8308723064458cb0af5729",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
@ -59,7 +59,7 @@
|
||||
"upload",
|
||||
"widget"
|
||||
],
|
||||
"time": "2019-04-22T09:21:57+00:00"
|
||||
"time": "2019-05-24T07:59:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bshaffer/oauth2-server-php",
|
||||
@ -957,16 +957,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sabre/xml",
|
||||
"version": "1.5.0",
|
||||
"version": "1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sabre-io/xml.git",
|
||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
|
||||
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
|
||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
|
||||
"url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -978,7 +978,7 @@
|
||||
"sabre/uri": ">=1.0,<3.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*",
|
||||
"phpunit/phpunit": "~4.8|~5.7",
|
||||
"sabre/cs": "~1.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
@ -1016,7 +1016,7 @@
|
||||
"dom",
|
||||
"xml"
|
||||
],
|
||||
"time": "2016-10-09T22:57:52+00:00"
|
||||
"time": "2019-01-09T13:51:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "simplepie/simplepie",
|
||||
|
@ -672,6 +672,8 @@ function service_class_allows($uid, $property, $usage = false) {
|
||||
return true; // No service class set => everything is allowed
|
||||
|
||||
$limit = engr_units_to_bytes($limit);
|
||||
if($limit == 0)
|
||||
return true; // 0 means no limits
|
||||
if($usage === false) {
|
||||
// We use negative values for not allowed properties in a subscriber plan
|
||||
return ((x($limit)) ? (bool) $limit : true);
|
||||
@ -759,7 +761,7 @@ function service_class_fetch($uid, $property) {
|
||||
if(! is_array($arr) || (! count($arr)))
|
||||
return false;
|
||||
|
||||
return((array_key_exists($property, $arr)) ? $arr[$property] : false);
|
||||
return((array_key_exists($property, $arr) && $arr[$property] != 0) ? $arr[$property] : false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -96,11 +96,15 @@ function api_login(&$a){
|
||||
if($sigblock) {
|
||||
$keyId = str_replace('acct:','',$sigblock['keyId']);
|
||||
if($keyId) {
|
||||
$r = q("select * from hubloc where hubloc_addr = '%s' limit 1",
|
||||
$r = q("select * from hubloc where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) limit 1",
|
||||
dbesc($keyId),
|
||||
dbesc($keyId)
|
||||
);
|
||||
if($r) {
|
||||
$c = channelx_by_hash($r[0]['hubloc_hash']);
|
||||
if (! $c) {
|
||||
$c = channelx_by_portid($r[0]['hubloc_hash']);
|
||||
}
|
||||
if($c) {
|
||||
$a = q("select * from account where account_id = %d limit 1",
|
||||
intval($c['channel_account_id'])
|
||||
|
@ -6,8 +6,8 @@
|
||||
api_register_func('api/export/basic','api_export_basic', true);
|
||||
api_register_func('api/red/channel/export/basic','api_export_basic', true);
|
||||
api_register_func('api/z/1.0/channel/export/basic','api_export_basic', true);
|
||||
api_register_func('api/red/item/export/page','api_item_export_page', true);
|
||||
api_register_func('api/z/1.0/item/export/page','api_item_export_page', true);
|
||||
api_register_func('api/red/item/export_page','api_item_export_page', true);
|
||||
api_register_func('api/z/1.0/item/export_page','api_item_export_page', true);
|
||||
api_register_func('api/red/channel/list','api_channel_list', true);
|
||||
api_register_func('api/z/1.0/channel/list','api_channel_list', true);
|
||||
api_register_func('api/red/channel/stream','api_channel_stream', true);
|
||||
|
@ -1514,12 +1514,15 @@ function attach_delete($channel_id, $resource, $is_photo = 0) {
|
||||
|
||||
function attach_drop_photo($channel_id,$resource) {
|
||||
|
||||
$x = q("select id, item_hidden from item where resource_id = '%s' and resource_type = 'photo' and uid = %d",
|
||||
$x = q("select id, item_hidden from item where resource_id = '%s' and resource_type = 'photo' and uid = %d and item_deleted = 0",
|
||||
dbesc($resource),
|
||||
intval($channel_id)
|
||||
);
|
||||
|
||||
if($x) {
|
||||
drop_item($x[0]['id'],false,(($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1),true);
|
||||
$stage = (($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1);
|
||||
$interactive = (($x[0]['item_hidden']) ? false : true);
|
||||
drop_item($x[0]['id'], $interactive, $stage);
|
||||
}
|
||||
|
||||
$r = q("SELECT content FROM photo WHERE resource_id = '%s' AND uid = %d AND os_storage = 1",
|
||||
|
@ -1161,7 +1161,7 @@ function channel_export_items_date($channel_id, $start, $finish) {
|
||||
$ret['relocate'] = [ 'channel_address' => $ch['channel_address'], 'url' => z_root()];
|
||||
}
|
||||
|
||||
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and created >= '%s' and created <= '%s' and resource_type = '' order by created",
|
||||
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and created >= '%s' and created <= '%s' and resource_type != 'photo' order by created",
|
||||
intval(ITEM_TYPE_POST),
|
||||
intval($channel_id),
|
||||
dbesc($start),
|
||||
@ -1223,7 +1223,7 @@ function channel_export_items_page($channel_id, $start, $finish, $page = 0, $lim
|
||||
$ret['relocate'] = [ 'channel_address' => $ch['channel_address'], 'url' => z_root()];
|
||||
}
|
||||
|
||||
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and resource_type = '' and created >= '%s' and created <= '%s' order by created limit %d offset %d",
|
||||
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and resource_type != 'photo' and created >= '%s' and created <= '%s' order by created limit %d offset %d",
|
||||
intval(ITEM_TYPE_POST),
|
||||
intval($channel_id),
|
||||
dbesc($start),
|
||||
|
@ -516,13 +516,14 @@ function update_birthdays() {
|
||||
'event_xchan' => $rr['xchan_hash'],
|
||||
'dtstart' => datetime_convert('UTC', 'UTC', $rr['abook_dob']),
|
||||
'dtend' => datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day '),
|
||||
'adjust' => intval(feature_enabled($rr['abook_channel'],'smart_birthdays')),
|
||||
'adjust' => 0,
|
||||
'summary' => sprintf( t('%1$s\'s birthday'), $rr['xchan_name']),
|
||||
'description' => sprintf( t('Happy Birthday %1$s'), '[zrl=' . $rr['xchan_url'] . ']' . $rr['xchan_name'] . '[/zrl]'),
|
||||
'etype' => 'birthday',
|
||||
];
|
||||
|
||||
$z = event_store_event($ev);
|
||||
|
||||
if ($z) {
|
||||
$item_id = event_store_item($ev, $z);
|
||||
q("update abook set abook_dob = '%s' where abook_id = %d",
|
||||
|
@ -329,13 +329,36 @@ function update_directory_entry($ud) {
|
||||
|
||||
if ($ud['ud_addr'] && (! ($ud['ud_flags'] & UPDATE_FLAGS_DELETED))) {
|
||||
$success = false;
|
||||
$x = zot_finger($ud['ud_addr'], '');
|
||||
if ($x['success']) {
|
||||
$j = json_decode($x['body'], true);
|
||||
if ($j)
|
||||
$success = true;
|
||||
|
||||
$y = import_xchan($j, 0, $ud);
|
||||
// directory migration phase 1 (Macgirvin - 29-JUNE-2019)
|
||||
// fetch zot6 info (if available) as well as historical zot info (if available)
|
||||
// Once this has been running for > 1 month on the primary directory we can deprecate the historical info and
|
||||
// modify the directory search to only return zot6 entries, and also modify this function
|
||||
// to *only* fetch the zot6 entries.
|
||||
// Otherwise we'll be showing duplicates or have a mostly empty directory for a good chunk of
|
||||
// the transition period. Directory server load will likely increase "moderately" during this transition.
|
||||
// The one month counter begins when the primary directory has upgraded to a release which uses this code.
|
||||
// Hubzilla channels running traditional zot which have not upgraded can or will be dropped from the directory or
|
||||
// "not found" at the end of the transition period as the directory will only serve zot6 entries at that time.
|
||||
|
||||
$uri = \Zotlabs\Lib\Webfinger::zot_url($ud['ud_addr']);
|
||||
if($uri) {
|
||||
$record = \Zotlabs\Lib\Zotfinger::exec($uri);
|
||||
|
||||
// Check the HTTP signature
|
||||
|
||||
$hsig = $record['signature'];
|
||||
if($hsig && $hsig['signer'] === $url && $hsig['header_valid'] === true && $hsig['content_valid'] === true) {
|
||||
$x = \Zotlabs\Zot\Libzot::import_xchan($record['data'], 0, $ud);
|
||||
if($x['success']) {
|
||||
$success = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$x = \Zotlabs\Zot\Finger::run($ud['ud_addr'], '');
|
||||
if ($x['success']) {
|
||||
import_xchan($x, 0, $ud);
|
||||
$success = true;
|
||||
}
|
||||
if (! $success) {
|
||||
q("update updates set ud_last = '%s' where ud_addr = '%s'",
|
||||
|
@ -27,6 +27,7 @@ function format_event_html($ev) {
|
||||
if(! ((is_array($ev)) && count($ev)))
|
||||
return '';
|
||||
|
||||
$tz = (($ev['timezone']) ? $ev['timezone'] : 'UTC');
|
||||
|
||||
$bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM
|
||||
|
||||
@ -39,7 +40,7 @@ function format_event_html($ev) {
|
||||
$o .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span> <span class="dtstart" title="'
|
||||
. datetime_convert('UTC', 'UTC', $ev['dtstart'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
|
||||
. '" >'
|
||||
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
|
||||
. (($ev['adjust']) ? day_translate(datetime_convert($tz, date_default_timezone_get(),
|
||||
$ev['dtstart'] , $bd_format ))
|
||||
: day_translate(datetime_convert('UTC', 'UTC',
|
||||
$ev['dtstart'] , $bd_format)))
|
||||
@ -49,7 +50,7 @@ function format_event_html($ev) {
|
||||
$o .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span> <span class="dtend" title="'
|
||||
. datetime_convert('UTC','UTC',$ev['dtend'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
|
||||
. '" >'
|
||||
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
|
||||
. (($ev['adjust']) ? day_translate(datetime_convert($tz, date_default_timezone_get(),
|
||||
$ev['dtend'] , $bd_format ))
|
||||
: day_translate(datetime_convert('UTC', 'UTC',
|
||||
$ev['dtend'] , $bd_format )))
|
||||
@ -75,17 +76,35 @@ function format_event_obj($jobject) {
|
||||
//ensure compatibility with older items - this check can be removed at a later point
|
||||
if(array_key_exists('description', $object)) {
|
||||
|
||||
$bd_format = t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8:01 AM
|
||||
$tz = (($object['timezone']) ? $object['timezone'] : 'UTC');
|
||||
$allday = (($object['adjust']) ? false : true);
|
||||
|
||||
$dtstart = new DateTime($object['dtstart']);
|
||||
$dtend = new DateTime($object['dtend']);
|
||||
$dtdiff = $dtstart->diff($dtend);
|
||||
|
||||
if($allday && ($dtdiff->days < 2))
|
||||
$oneday = true;
|
||||
|
||||
if($allday && !$oneday) {
|
||||
// Subtract one day from the end date so we can use the "first day - last day" format for display.
|
||||
$dtend->modify('-1 day');
|
||||
$object['dtend'] = datetime_convert('UTC', 'UTC', $dtend->format('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
$bd_format = (($allday) ? t('l F d, Y') : t('l F d, Y \@ g:i A')); // Friday January 18, 2011 @ 8:01 AM or Friday January 18, 2011 for allday events
|
||||
|
||||
$event['header'] = replace_macros(get_markup_template('event_item_header.tpl'),array(
|
||||
'$title' => zidify_links(smilies(bbcode($object['title']))),
|
||||
'$dtstart_label' => t('Starts:'),
|
||||
'$dtstart_title' => datetime_convert('UTC', 'UTC', $object['dtstart'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
|
||||
'$dtstart_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['dtstart'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['dtstart'] , $bd_format))),
|
||||
'$dtstart_label' => t('Start:'),
|
||||
'$dtstart_title' => datetime_convert($tz, date_default_timezone_get(), $object['dtstart'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
|
||||
'$dtstart_dt' => (($object['adjust']) ? day_translate(datetime_convert($tz, date_default_timezone_get(), $object['dtstart'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['dtstart'] , $bd_format))),
|
||||
'$finish' => (($object['nofinish']) ? false : true),
|
||||
'$dtend_label' => t('Finishes:'),
|
||||
'$dtend_title' => datetime_convert('UTC','UTC',$object['dtend'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
|
||||
'$dtend_dt' => (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $object['dtend'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['dtend'] , $bd_format )))
|
||||
'$dtend_label' => t('End:'),
|
||||
'$dtend_title' => datetime_convert($tz, date_default_timezone_get(), $object['dtend'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )),
|
||||
'$dtend_dt' => (($object['adjust']) ? day_translate(datetime_convert($tz, date_default_timezone_get(), $object['dtend'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $object['dtend'] , $bd_format ))),
|
||||
'$allday' => $allday,
|
||||
'$oneday' => $oneday
|
||||
));
|
||||
|
||||
$event['content'] = replace_macros(get_markup_template('event_item_content.tpl'),array(
|
||||
@ -125,6 +144,12 @@ function format_event_ical($ev) {
|
||||
if($ev['etype'] === 'task')
|
||||
return format_todo_ical($ev);
|
||||
|
||||
$tz = get_iconfig($ev['item_id'], 'event', 'timezone');
|
||||
if(! $tz)
|
||||
$tz = 'UTC';
|
||||
|
||||
$tzid = ';TZID=' . $tz;
|
||||
|
||||
$o = '';
|
||||
|
||||
$o .= "\r\nBEGIN:VEVENT";
|
||||
@ -132,10 +157,19 @@ function format_event_ical($ev) {
|
||||
$o .= "\r\nCREATED:" . datetime_convert('UTC','UTC', $ev['created'],'Ymd\\THis\\Z');
|
||||
$o .= "\r\nLAST-MODIFIED:" . datetime_convert('UTC','UTC', $ev['edited'],'Ymd\\THis\\Z');
|
||||
$o .= "\r\nDTSTAMP:" . datetime_convert('UTC','UTC', $ev['edited'],'Ymd\\THis\\Z');
|
||||
if($ev['dtstart'])
|
||||
$o .= "\r\nDTSTART:" . datetime_convert('UTC','UTC', $ev['dtstart'],'Ymd\\THis' . (($ev['adjust']) ? '\\Z' : ''));
|
||||
if($ev['dtend'] && ! $ev['nofinish'])
|
||||
$o .= "\r\nDTEND:" . datetime_convert('UTC','UTC', $ev['dtend'],'Ymd\\THis' . (($ev['adjust']) ? '\\Z' : ''));
|
||||
|
||||
if($ev['adjust']) {
|
||||
if($ev['dtstart'])
|
||||
$o .= "\r\nDTSTART$tzid:" . datetime_convert($tz,'UTC', $ev['dtstart'],'Ymd\\THis\\Z');
|
||||
if($ev['dtend'] && ! $ev['nofinish'])
|
||||
$o .= "\r\nDTEND$tzid:" . datetime_convert($tz,'UTC', $ev['dtend'],'Ymd\\THis\\Z');
|
||||
}
|
||||
else {
|
||||
if($ev['dtstart'])
|
||||
$o .= "\r\nDTSTART;VALUE=DATE:" . datetime_convert('UTC','UTC', $ev['dtstart'],'Ymd');
|
||||
if($ev['dtend'] && ! $ev['nofinish'])
|
||||
$o .= "\r\nDTEND;VALUE=DATE:" . datetime_convert('UTC','UTC', $ev['dtend'],'Ymd');
|
||||
}
|
||||
if($ev['summary']) {
|
||||
$o .= "\r\nSUMMARY:" . format_ical_text($ev['summary']);
|
||||
$o .= "\r\nX-ZOT-SUMMARY:" . format_ical_sourcetext($ev['summary']);
|
||||
@ -723,17 +757,9 @@ function parse_vobject($ical, $type) {
|
||||
|
||||
|
||||
function parse_ical_file($f,$uid) {
|
||||
require_once('vendor/autoload.php');
|
||||
|
||||
$s = @file_get_contents($f);
|
||||
|
||||
// Change the current timezone to something besides UTC.
|
||||
// Doesn't matter what it is, as long as it isn't UTC.
|
||||
// Save the current timezone so we can reset it when we're done processing.
|
||||
|
||||
$saved_timezone = date_default_timezone_get();
|
||||
date_default_timezone_set('Australia/Sydney');
|
||||
|
||||
$ical = VObject\Reader::read($s);
|
||||
|
||||
if($ical) {
|
||||
@ -749,8 +775,6 @@ function parse_ical_file($f,$uid) {
|
||||
}
|
||||
}
|
||||
|
||||
date_default_timezone_set($saved_timezone);
|
||||
|
||||
if($ical)
|
||||
return true;
|
||||
|
||||
@ -782,12 +806,23 @@ function event_import_ical($ical, $uid) {
|
||||
|
||||
// logger('dtstart: ' . var_export($dtstart,true));
|
||||
|
||||
$ev['dtstart'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),'UTC',
|
||||
$ev['timezone'] = 'UTC';
|
||||
|
||||
// Try to get an usable olson format timezone
|
||||
if($ev['adjust']) {
|
||||
//TODO: we should pass the vcalendar to getTimeZone() to be more accurate
|
||||
// we do not have it here since parse_ical_file() is passing the vevent only.
|
||||
$timezone_obj = \Sabre\VObject\TimeZoneUtil::getTimeZone($ical->DTSTART['TZID']);
|
||||
$timezone = $timezone_obj->getName();
|
||||
$ev['timezone'] = $timezone;
|
||||
}
|
||||
|
||||
$ev['dtstart'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),$ev['timezone'],
|
||||
$dtstart->format(\DateTime::W3C));
|
||||
|
||||
if(isset($ical->DTEND)) {
|
||||
$dtend = $ical->DTEND->getDateTime();
|
||||
$ev['dtend'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),'UTC',
|
||||
$ev['dtend'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),$ev['timezone'],
|
||||
$dtend->format(\DateTime::W3C));
|
||||
}
|
||||
else {
|
||||
@ -1042,6 +1077,7 @@ function event_store_item($arr, $event) {
|
||||
'type' => ACTIVITY_OBJ_EVENT,
|
||||
'id' => z_root() . '/event/' . $r[0]['resource_id'],
|
||||
'title' => $arr['summary'],
|
||||
'timezone' => $arr['timezone'],
|
||||
'dtstart' => $arr['dtstart'],
|
||||
'dtend' => $arr['dtend'],
|
||||
'nofinish' => $arr['nofinish'],
|
||||
@ -1107,6 +1143,8 @@ function event_store_item($arr, $event) {
|
||||
}
|
||||
|
||||
$item_id = $r[0]['id'];
|
||||
set_iconfig($item_id, 'event', 'timezone', $arr['timezone'], true);
|
||||
|
||||
/**
|
||||
* @hooks event_updated
|
||||
* Called when an event record is modified.
|
||||
@ -1197,6 +1235,7 @@ function event_store_item($arr, $event) {
|
||||
'type' => ACTIVITY_OBJ_EVENT,
|
||||
'id' => z_root() . '/event/' . $event['event_hash'],
|
||||
'title' => $arr['summary'],
|
||||
'timezone' => $arr['timezone'],
|
||||
'dtstart' => $arr['dtstart'],
|
||||
'dtend' => $arr['dtend'],
|
||||
'nofinish' => $arr['nofinish'],
|
||||
@ -1223,6 +1262,7 @@ function event_store_item($arr, $event) {
|
||||
// activities refer to the item message_id as the parent.
|
||||
|
||||
set_iconfig($item_arr, 'system','event_id',$event['event_hash'],true);
|
||||
set_iconfig($item_arr, 'event','timezone',$arr['timezone'],true);
|
||||
|
||||
$res = item_store($item_arr);
|
||||
|
||||
|
@ -87,6 +87,14 @@ function get_features($filtered = true, $level = (-1)) {
|
||||
t('Default is Sunday'),
|
||||
false,
|
||||
get_config('feature_lock','cal_first_day')
|
||||
],
|
||||
|
||||
[
|
||||
'event_tz_select',
|
||||
t('Event Timezone Selection'),
|
||||
t('Allow event creation in timezones other than your own.'),
|
||||
false,
|
||||
get_config('feature_lock','event_tz_select'),
|
||||
]
|
||||
|
||||
],
|
||||
@ -272,36 +280,6 @@ function get_features($filtered = true, $level = (-1)) {
|
||||
|
||||
],
|
||||
|
||||
'events' => [
|
||||
|
||||
t('Events'),
|
||||
|
||||
[
|
||||
'events_cal_first_day',
|
||||
t('Start calendar week on Monday'),
|
||||
t('Default is Sunday'),
|
||||
false,
|
||||
get_config('feature_lock','events_cal_first_day')
|
||||
],
|
||||
|
||||
[
|
||||
'smart_birthdays',
|
||||
t('Smart Birthdays'),
|
||||
t('Make birthday events timezone aware in case your friends are scattered across the planet.'),
|
||||
true,
|
||||
get_config('feature_lock','smart_birthdays'),
|
||||
],
|
||||
|
||||
[
|
||||
'event_tz_select',
|
||||
t('Event Timezone Selection'),
|
||||
t('Allow event creation in timezones other than your own.'),
|
||||
false,
|
||||
get_config('feature_lock','event_tz_select'),
|
||||
]
|
||||
|
||||
],
|
||||
|
||||
'manage' => [
|
||||
|
||||
t('Manage'),
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
use Zotlabs\Lib\IConfig;
|
||||
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
|
||||
require_once('include/menu.php');
|
||||
require_once('include/perm_upgrade.php');
|
||||
|
||||
@ -897,9 +899,9 @@ function import_menus($channel, $menus) {
|
||||
$m['menu_name'] = $menu['pagetitle'];
|
||||
$m['menu_desc'] = $menu['desc'];
|
||||
if($menu['created'])
|
||||
$m['menu_created'] = datetime_convert($menu['created']);
|
||||
$m['menu_created'] = datetime_convert('UTC','UTC',$menu['created']);
|
||||
if($menu['edited'])
|
||||
$m['menu_edited'] = datetime_convert($menu['edited']);
|
||||
$m['menu_edited'] = datetime_convert('UTC','UTC',$menu['edited']);
|
||||
|
||||
$m['menu_flags'] = 0;
|
||||
if($menu['flags']) {
|
||||
@ -955,9 +957,9 @@ function sync_menus($channel, $menus) {
|
||||
$m['menu_name'] = $menu['pagetitle'];
|
||||
$m['menu_desc'] = $menu['desc'];
|
||||
if($menu['created'])
|
||||
$m['menu_created'] = datetime_convert($menu['created']);
|
||||
$m['menu_created'] = datetime_convert('UTC','UTC',$menu['created']);
|
||||
if($menu['edited'])
|
||||
$m['menu_edited'] = datetime_convert($menu['edited']);
|
||||
$m['menu_edited'] = datetime_convert('UTC','UTC',$menu['edited']);
|
||||
|
||||
$m['menu_flags'] = 0;
|
||||
if($menu['flags']) {
|
||||
@ -1177,7 +1179,7 @@ function sync_files($channel, $files) {
|
||||
convert_oldfields($att,'data','content');
|
||||
|
||||
if($att['deleted']) {
|
||||
attach_delete($channel,$att['hash']);
|
||||
attach_delete($channel['channel_id'],$att['hash']);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1329,7 +1331,7 @@ function sync_files($channel, $files) {
|
||||
$headers = [];
|
||||
$headers['Accept'] = 'application/x-zot+json' ;
|
||||
$headers['Sigtoken'] = random_string();
|
||||
$headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512');
|
||||
$headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], 'acct:' . channel_reddress($channel),true,'sha512');
|
||||
|
||||
$x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]);
|
||||
fclose($fp);
|
||||
@ -1383,12 +1385,14 @@ function sync_files($channel, $files) {
|
||||
);
|
||||
}
|
||||
|
||||
if(intval($p['imgscale']) === 0 && $p['os_storage'])
|
||||
$p['content'] = $store_path;
|
||||
else
|
||||
if(intval($p['os_storage'])) {
|
||||
$p['content'] = $store_path . ((intval($p['imgscale'])) ? '-' . $p['imgscale'] : '');
|
||||
}
|
||||
else {
|
||||
$p['content'] = (($p['content'])? base64_decode($p['content']) : '');
|
||||
}
|
||||
|
||||
if(intval($p['imgscale']) && (! empty($p['content']))) {
|
||||
if(intval($p['imgscale'])) {
|
||||
|
||||
$time = datetime_convert();
|
||||
|
||||
@ -1413,7 +1417,7 @@ function sync_files($channel, $files) {
|
||||
$headers = [];
|
||||
$headers['Accept'] = 'application/x-zot+json' ;
|
||||
$headers['Sigtoken'] = random_string();
|
||||
$headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512');
|
||||
$headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel),true,'sha512');
|
||||
|
||||
$x = z_post_url($fetch_url,$parr,$redirects,[ 'filep' => $fp, 'headers' => $headers]);
|
||||
fclose($fp);
|
||||
@ -1643,12 +1647,12 @@ function import_webpage_element($element, $channel, $type) {
|
||||
$arr['created'] = $iteminfo[0]['created'];
|
||||
}
|
||||
else { // otherwise, generate the creation times and unique id
|
||||
$arr['created'] = datetime_convert('UTC', 'UTC');
|
||||
$arr['created'] = datetime_convert();
|
||||
$arr['uuid'] = item_message_id();
|
||||
$arr['mid'] = $arr['parent_mid'] = z_root() . '/item/' . $arr['uuid'];
|
||||
}
|
||||
// Update the edited time whether or not the element already exists
|
||||
$arr['edited'] = datetime_convert('UTC', 'UTC');
|
||||
$arr['edited'] = datetime_convert();
|
||||
// Import the actual element content
|
||||
$arr['body'] = file_get_contents($element['path']);
|
||||
// The element owner is the channel importing the elements
|
||||
|
@ -1457,6 +1457,7 @@ function encode_mail($item,$extended = false) {
|
||||
$x['to'] = encode_item_xchan($item['to']);
|
||||
$x['raw'] = $item['mail_raw'];
|
||||
$x['mimetype'] = $item['mail_mimetype'];
|
||||
$x['sig'] = $item['sig'];
|
||||
|
||||
if($item['attach'])
|
||||
$x['attach'] = json_decode($item['attach'],true);
|
||||
@ -1516,6 +1517,9 @@ function get_mail_elements($x) {
|
||||
$arr['expires'] = datetime_convert('UTC','UTC',$x['expires']);
|
||||
|
||||
$arr['mail_flags'] = 0;
|
||||
|
||||
if(array_key_exists('sig',$x))
|
||||
$arr['sig'] = $x['sig'];
|
||||
|
||||
if($x['flags'] && is_array($x['flags'])) {
|
||||
if(in_array('recalled',$x['flags'])) {
|
||||
@ -1984,11 +1988,12 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
||||
unset($arr['iconfig']);
|
||||
}
|
||||
|
||||
|
||||
if(strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid) || strlen($public_policy))
|
||||
$private = 1;
|
||||
else
|
||||
$private = $arr['item_private'];
|
||||
$private = intval($arr['item_private']);
|
||||
if (! $private) {
|
||||
if (strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid)) {
|
||||
$private = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$arr['parent'] = $parent_id;
|
||||
$arr['allow_cid'] = $allow_cid;
|
||||
@ -2007,7 +2012,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
||||
// find the item we just created
|
||||
|
||||
$r = q("SELECT * FROM item WHERE mid = '%s' AND uid = %d and revision = %d ORDER BY id ASC ",
|
||||
$arr['mid'], // already dbesc'd
|
||||
dbesc($arr['mid']),
|
||||
intval($arr['uid']),
|
||||
intval($arr['revision'])
|
||||
);
|
||||
@ -2028,7 +2033,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
|
||||
if(count($r) > 1) {
|
||||
logger('item_store: duplicated post occurred. Removing duplicates.');
|
||||
q("DELETE FROM item WHERE mid = '%s' AND uid = %d AND id != %d ",
|
||||
$arr['mid'],
|
||||
dbesc($arr['mid']),
|
||||
intval($arr['uid']),
|
||||
intval($current_post)
|
||||
);
|
||||
@ -3663,7 +3668,7 @@ function retain_item($id) {
|
||||
);
|
||||
}
|
||||
|
||||
function drop_items($items,$interactive = false,$stage = DROPITEM_NORMAL,$force = false) {
|
||||
function drop_items($items,$interactive = false,$stage = DROPITEM_NORMAL) {
|
||||
$uid = 0;
|
||||
|
||||
if(! local_channel() && ! remote_channel())
|
||||
@ -3671,7 +3676,7 @@ function drop_items($items,$interactive = false,$stage = DROPITEM_NORMAL,$force
|
||||
|
||||
if(count($items)) {
|
||||
foreach($items as $item) {
|
||||
$owner = drop_item($item,$interactive,$stage,$force);
|
||||
$owner = drop_item($item,$interactive,$stage);
|
||||
if($owner && ! $uid)
|
||||
$uid = $owner;
|
||||
}
|
||||
@ -3694,12 +3699,7 @@ function drop_items($items,$interactive = false,$stage = DROPITEM_NORMAL,$force
|
||||
// $stage = 1 => set deleted flag on the item and perform intial notifications
|
||||
// $stage = 2 => perform low level delete at a later stage
|
||||
|
||||
function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = false) {
|
||||
|
||||
// These resource types have linked items that should only be removed at the same time
|
||||
// as the linked resource; if we encounter one set it to item_hidden rather than item_deleted.
|
||||
|
||||
$linked_resource_types = [ 'photo' ];
|
||||
function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL) {
|
||||
|
||||
// locate item to be deleted
|
||||
|
||||
@ -3711,26 +3711,23 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = fal
|
||||
if(! $interactive)
|
||||
return 0;
|
||||
notice( t('Item not found.') . EOL);
|
||||
goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
//goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
}
|
||||
|
||||
$item = $r[0];
|
||||
|
||||
$linked_item = (($item['resource_id'] && $item['resource_type'] && in_array($item['resource_type'], $linked_resource_types)) ? true : false);
|
||||
|
||||
$ok_to_delete = false;
|
||||
|
||||
// system deletion
|
||||
if(! $interactive)
|
||||
$ok_to_delete = true;
|
||||
|
||||
// owner deletion
|
||||
if(local_channel() && local_channel() == $item['uid'])
|
||||
// admin deletion
|
||||
if(is_site_admin())
|
||||
$ok_to_delete = true;
|
||||
|
||||
// sys owned item, requires site admin to delete
|
||||
$sys = get_sys_channel();
|
||||
if(is_site_admin() && $sys['channel_id'] == $item['uid'])
|
||||
// owner deletion
|
||||
if(local_channel() && local_channel() == $item['uid'])
|
||||
$ok_to_delete = true;
|
||||
|
||||
// author deletion
|
||||
@ -3743,16 +3740,9 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = fal
|
||||
// set the deleted flag immediately on this item just in case the
|
||||
// hook calls a remote process which loops. We'll delete it properly in a second.
|
||||
|
||||
if(($linked_item) && (! $force)) {
|
||||
$r = q("UPDATE item SET item_hidden = 1 WHERE id = %d",
|
||||
intval($item['id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
$r = q("UPDATE item SET item_deleted = 1 WHERE id = %d",
|
||||
intval($item['id'])
|
||||
);
|
||||
}
|
||||
$r = q("UPDATE item SET item_deleted = 1 WHERE id = %d",
|
||||
intval($item['id'])
|
||||
);
|
||||
|
||||
$arr = [
|
||||
'item' => $item,
|
||||
@ -3792,14 +3782,13 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = fal
|
||||
if((intval($item['item_wall']) && ($stage != DROPITEM_PHASE2)) || ($stage == DROPITEM_PHASE1)) {
|
||||
Master::Summon([ 'Notifier','drop',$notify_id ]);
|
||||
}
|
||||
|
||||
goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
//goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
}
|
||||
else {
|
||||
if(! $interactive)
|
||||
return 0;
|
||||
notice( t('Permission denied.') . EOL);
|
||||
goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
//goaway(z_root() . '/' . $_SESSION['return_url']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3814,11 +3803,9 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL,$force = fal
|
||||
* @param boolean $force
|
||||
* @return boolean
|
||||
*/
|
||||
function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
|
||||
function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL) {
|
||||
|
||||
$linked_item = (($item['resource_id']) ? true : false);
|
||||
|
||||
logger('item: ' . $item['id'] . ' stage: ' . $stage . ' force: ' . $force, LOGGER_DATA);
|
||||
logger('item: ' . $item['id'] . ' stage: ' . $stage, LOGGER_DATA);
|
||||
|
||||
switch($stage) {
|
||||
case DROPITEM_PHASE2:
|
||||
@ -3831,42 +3818,50 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
|
||||
break;
|
||||
|
||||
case DROPITEM_PHASE1:
|
||||
if($linked_item && ! $force) {
|
||||
$r = q("UPDATE item SET item_hidden = 1,
|
||||
changed = '%s', edited = '%s' WHERE id = %d",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($item['id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
$r = q("UPDATE item set item_deleted = 1, changed = '%s', edited = '%s' where id = %d",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($item['id'])
|
||||
);
|
||||
}
|
||||
|
||||
$r = q("UPDATE item set item_deleted = 1, changed = '%s', edited = '%s' where id = %d",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($item['id'])
|
||||
);
|
||||
break;
|
||||
|
||||
case DROPITEM_NORMAL:
|
||||
default:
|
||||
if($linked_item && ! $force) {
|
||||
$r = q("UPDATE item SET item_hidden = 1,
|
||||
changed = '%s', edited = '%s' WHERE id = %d",
|
||||
dbesc(datetime_convert()),
|
||||
dbesc(datetime_convert()),
|
||||
intval($item['id'])
|
||||
);
|
||||
}
|
||||
else {
|
||||
$r = q("DELETE FROM item WHERE id = %d",
|
||||
intval($item['id'])
|
||||
);
|
||||
}
|
||||
$r = q("DELETE FROM item WHERE id = %d",
|
||||
intval($item['id'])
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
// immediately remove local linked resources
|
||||
|
||||
if($item['resource_type'] === 'event') {
|
||||
$r = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc($item['resource_id']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
|
||||
$sync_data = $r[0];
|
||||
|
||||
$x = q("delete from event where event_hash = '%s' and uid = %d",
|
||||
dbesc($item['resource_id']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
|
||||
if($x) {
|
||||
$sync_data['event_deleted'] = 1;
|
||||
build_sync_packet($item['uid'], ['event' => [$sync_data]]);
|
||||
}
|
||||
}
|
||||
|
||||
if($item['resource_type'] === 'photo') {
|
||||
attach_delete($item['uid'], $item['resource_id'], true );
|
||||
$channel = channelx_by_n($item['uid']);
|
||||
$sync_data = attach_export_data($channel, $item['resource_id'], true);
|
||||
if($sync_data)
|
||||
build_sync_packet($item['uid'], ['file' => [$sync_data]]);
|
||||
}
|
||||
|
||||
// immediately remove any undesired profile likes.
|
||||
|
||||
q("delete from likes where iid = %d and channel_id = %d",
|
||||
@ -4620,12 +4615,12 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow,
|
||||
if(strpos($access_tag,'cid:') === 0) {
|
||||
$str_contact_allow .= '<' . substr($access_tag,4) . '>';
|
||||
$access_tag = '';
|
||||
$private = 1;
|
||||
$private = 2;
|
||||
}
|
||||
elseif(strpos($access_tag,'gid:') === 0) {
|
||||
$str_group_allow .= '<' . substr($access_tag,4) . '>';
|
||||
$access_tag = '';
|
||||
$private = 1;
|
||||
$private = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,8 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
|
||||
|
||||
$s = html2bbcode($s);
|
||||
|
||||
$s = bb_code_protect($s);
|
||||
|
||||
// Convert everything that looks like a link to a link
|
||||
if($use_zrl) {
|
||||
if (strpos($s,'[/img]') !== false) {
|
||||
@ -88,6 +90,8 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
|
||||
$s = preg_replace("/([^\]\=\{\/]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[url=$2$3]$2$3[/url]',$s);
|
||||
}
|
||||
|
||||
$s = bb_code_unprotect($s);
|
||||
|
||||
// remove duplicate adjacent code tags
|
||||
$s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
|
||||
|
||||
|
@ -19,7 +19,7 @@ function mail_prepare_binary($item) {
|
||||
// send a private message
|
||||
|
||||
|
||||
function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $replyto = '', $expires = NULL_DATE, $mimetype = 'text/bbcode', $raw = false) {
|
||||
function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $replyto = '', $expires = NULL_DATE, $mimetype = 'text/bbcode', $raw = false, $sig = '') {
|
||||
|
||||
$ret = array('success' => false);
|
||||
$is_reply = false;
|
||||
@ -175,8 +175,7 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
|
||||
$subject = str_rot47(base64url_encode($subject));
|
||||
if(($body )&& (! $raw))
|
||||
$body = str_rot47(base64url_encode($body));
|
||||
|
||||
$sig = ''; // placeholder
|
||||
|
||||
$mimetype = ''; //placeholder
|
||||
|
||||
$r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, mail_mimetype, title, body, sig, attach, mid, parent_mid, created, expires, mail_isreply, mail_raw )
|
||||
|
@ -1183,12 +1183,12 @@ function discover_by_webbie($webbie, $protocol = '') {
|
||||
*/
|
||||
function webfinger_rfc7033($webbie, $zot = false) {
|
||||
|
||||
if(strpos($webbie,'@')) {
|
||||
if(filter_var($webbie, FILTER_VALIDATE_EMAIL)) {
|
||||
$lhs = substr($webbie,0,strpos($webbie,'@'));
|
||||
$rhs = substr($webbie,strpos($webbie,'@')+1);
|
||||
$resource = urlencode('acct:' . $webbie);
|
||||
}
|
||||
else {
|
||||
elseif(filter_var($webbie, FILTER_VALIDATE_URL)) {
|
||||
$m = parse_url($webbie);
|
||||
if($m) {
|
||||
if($m['scheme'] !== 'https')
|
||||
@ -1197,9 +1197,10 @@ function webfinger_rfc7033($webbie, $zot = false) {
|
||||
$rhs = $m['host'] . (($m['port']) ? ':' . $m['port'] : '');
|
||||
$resource = urlencode($webbie);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
logger('fetching url from resource: ' . $rhs . ':' . $webbie);
|
||||
|
||||
$counter = 0;
|
||||
@ -1217,7 +1218,7 @@ function webfinger_rfc7033($webbie, $zot = false) {
|
||||
function old_webfinger($webbie) {
|
||||
|
||||
$host = '';
|
||||
if(strstr($webbie,'@'))
|
||||
if(filter_var($webbie, FILTER_VALIDATE_EMAIL))
|
||||
$host = substr($webbie,strpos($webbie,'@') + 1);
|
||||
|
||||
if(strlen($host)) {
|
||||
|
@ -261,7 +261,7 @@ function photo_upload($channel, $observer, $args) {
|
||||
$r0 = $ph->save($p);
|
||||
$link[0] = array(
|
||||
'rel' => 'alternate',
|
||||
'type' => 'text/html',
|
||||
'type' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-0.' . $ph->getExt(),
|
||||
'width' => $width,
|
||||
'height' => $height
|
||||
@ -280,7 +280,7 @@ function photo_upload($channel, $observer, $args) {
|
||||
$r1 = $ph->storeThumbnail($p, PHOTO_RES_1024);
|
||||
$link[1] = array(
|
||||
'rel' => 'alternate',
|
||||
'type' => 'text/html',
|
||||
'type' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-1.' . $ph->getExt(),
|
||||
'width' => $ph->getWidth(),
|
||||
'height' => $ph->getHeight()
|
||||
@ -294,7 +294,7 @@ function photo_upload($channel, $observer, $args) {
|
||||
$r2 = $ph->storeThumbnail($p, PHOTO_RES_640);
|
||||
$link[2] = array(
|
||||
'rel' => 'alternate',
|
||||
'type' => 'text/html',
|
||||
'type' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-2.' . $ph->getExt(),
|
||||
'width' => $ph->getWidth(),
|
||||
'height' => $ph->getHeight()
|
||||
@ -308,7 +308,7 @@ function photo_upload($channel, $observer, $args) {
|
||||
$r3 = $ph->storeThumbnail($p, PHOTO_RES_320);
|
||||
$link[3] = array(
|
||||
'rel' => 'alternate',
|
||||
'type' => 'text/html',
|
||||
'type' => $type,
|
||||
'href' => z_root() . '/photo/' . $photo_hash . '-3.' . $ph->getExt(),
|
||||
'width' => $ph->getWidth(),
|
||||
'height' => $ph->getHeight()
|
||||
@ -390,7 +390,7 @@ function photo_upload($channel, $observer, $args) {
|
||||
'edited' => $p['edited'],
|
||||
'id' => z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash,
|
||||
'link' => $link,
|
||||
'body' => $obj_body
|
||||
'body' => $summary
|
||||
);
|
||||
|
||||
$target = array(
|
||||
|
@ -1,5 +1,10 @@
|
||||
<?php /** @file */
|
||||
|
||||
|
||||
use Zotlabs\Lib\Libzot;
|
||||
use Zotlabs\Lib\Libzotdir;
|
||||
use Zotlabs\Lib\Zotfinger;
|
||||
|
||||
require_once('include/dir_fns.php');
|
||||
require_once('include/zot.php');
|
||||
|
||||
@ -122,7 +127,7 @@ function poco_load($xchan = '', $url = null) {
|
||||
$profile_url = $url['value'];
|
||||
continue;
|
||||
}
|
||||
if($url['type'] == 'zot') {
|
||||
if(in_array($url['type'], ['zot','zot6'] )) {
|
||||
$network = $url['type'];
|
||||
$address = str_replace('acct:' , '', $url['value']);
|
||||
continue;
|
||||
@ -151,6 +156,18 @@ function poco_load($xchan = '', $url = null) {
|
||||
|
||||
if(($x !== false) && (! count($x))) {
|
||||
if($address) {
|
||||
if($network === 'zot6') {
|
||||
$j = Zotfinger::exec($profile_url);
|
||||
if(is_array($j) && array_path_exists('signature/signer',$j) && $j['signature']['signer'] === $profile_url && intval($j['signature']['header_valid'])) {
|
||||
Libzot::import_xchan($j['data']);
|
||||
}
|
||||
$x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
|
||||
dbesc($hash)
|
||||
);
|
||||
if(! $x) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if($network === 'zot') {
|
||||
$j = Zotlabs\Zot\Finger::run($address,null);
|
||||
if($j['success']) {
|
||||
@ -402,7 +419,7 @@ function poco($a,$extended = false) {
|
||||
$sql_extra ",
|
||||
intval($channel_id)
|
||||
);
|
||||
$rooms = q("select * from menu_item where ( mitem_flags & " . intval(MENU_ITEM_CHATROOM) . " )>0 and allow_cid = '' and allow_gid = '' and deny_cid = '' and deny_gid = '' and mitem_channel_id = %d",
|
||||
$rooms = q("select * from menu_item where ( mitem_flags & " . intval(MENU_ITEM_CHATROOM) . " ) > 0 and allow_cid = '' and allow_gid = '' and deny_cid = '' and deny_gid = '' and mitem_channel_id = %d",
|
||||
intval($channel_id)
|
||||
);
|
||||
}
|
||||
|
@ -1572,7 +1572,9 @@ function format_hashtags(&$item) {
|
||||
$term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ;
|
||||
if(! trim($term))
|
||||
continue;
|
||||
if($t['url'] && strpos($item['body'], $t['url']))
|
||||
if(empty($t['url']))
|
||||
continue;
|
||||
if(strpos($item['body'], $t['url']) || stripos($item['body'], '#' . $t['term']))
|
||||
continue;
|
||||
if($s)
|
||||
$s .= ' ';
|
||||
@ -2456,8 +2458,8 @@ function magic_link($s) {
|
||||
* @param boolean $escape (optional) default false
|
||||
*/
|
||||
function stringify_array_elms(&$arr, $escape = false) {
|
||||
for($x = 0; $x < count($arr); $x ++)
|
||||
$arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'";
|
||||
foreach($arr as $k => $v)
|
||||
$arr[$k] = "'" . (($escape) ? dbesc($v) : $v) . "'";
|
||||
}
|
||||
|
||||
|
||||
@ -3091,7 +3093,7 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
|
||||
json_url_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['target']);
|
||||
}
|
||||
|
||||
$item['body'] = preg_replace("/(\[zrl=".preg_quote($old,'/')."\/(photos|gallery)\/".$channel['channel_address'].".+\]\[zmg=\d+x\d+\])".preg_quote($old,'/')."\/(.+\[\/zmg\])/", '${1}'.$new.'/${3}', $item['body']);
|
||||
$item['body'] = preg_replace("/(\[zrl=".preg_quote($old,'/')."\/(photo|photos|gallery)\/".$channel['channel_address'].".+\]\[zmg=\d+x\d+\])".preg_quote($old,'/')."\/(.+\[\/zmg\])/", '${1}'.$new.'/${3}', $item['body']);
|
||||
$item['body'] = preg_replace("/".preg_quote($old,'/')."\/(search|\w+\/".$channel['channel_address'].")/", $new.'/${1}', $item['body']);
|
||||
|
||||
$item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey']));
|
||||
@ -3105,6 +3107,15 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
|
||||
if($oldnick)
|
||||
$item['llink'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['llink']);
|
||||
|
||||
if($item['term']) {
|
||||
for($x = 0; $x < count($item['term']); $x ++) {
|
||||
$item['term'][$x]['url'] = str_replace($old,$new,$item['term'][$x]['url']);
|
||||
if ($oldnick) {
|
||||
$item['term'][$x]['url'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['term'][$x]['url']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Zotlabs\Zot6\HTTPSig;
|
||||
use Zotlabs\Web\HTTPSig;
|
||||
use Zotlabs\Lib\Libzot;
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ function is_matrix_url($url) {
|
||||
if(array_key_exists($m['host'],$remembered))
|
||||
return $remembered[$m['host']];
|
||||
|
||||
$r = q("select hubloc_url from hubloc where hubloc_host = '%s' and hubloc_network = 'zot' limit 1",
|
||||
$r = q("select hubloc_url from hubloc where hubloc_host = '%s' and hubloc_network in ('zot', 'zot6') limit 1",
|
||||
dbesc($m['host'])
|
||||
);
|
||||
if($r) {
|
||||
@ -205,20 +205,25 @@ function zidify_text($s) {
|
||||
*/
|
||||
function red_zrl_callback($matches) {
|
||||
|
||||
$zrl = is_matrix_url($matches[2]);
|
||||
|
||||
$t = strip_zids($matches[2]);
|
||||
if($t !== $matches[2]) {
|
||||
$zrl = true;
|
||||
$matches[2] = $t;
|
||||
}
|
||||
|
||||
if($matches[1] === '#^')
|
||||
$matches[1] = '';
|
||||
if($zrl)
|
||||
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]';
|
||||
|
||||
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]';
|
||||
// Catch and exclude trailing punctuation
|
||||
preg_match("/[.,;:!?)]*$/i", $matches[2], $pts);
|
||||
$matches[2] = substr($matches[2], 0, strlen($matches[2])-strlen($pts[0]));
|
||||
|
||||
$zrl = is_matrix_url($matches[2]);
|
||||
|
||||
$t = strip_zids($matches[2]);
|
||||
if($t !== $matches[2]) {
|
||||
$zrl = true;
|
||||
$matches[2] = $t;
|
||||
}
|
||||
|
||||
if($matches[1] === '#^')
|
||||
$matches[1] = '';
|
||||
|
||||
if($zrl)
|
||||
return $matches[1] . '#^[zrl=' . $matches[2] . ']' . $matches[2] . '[/zrl]' . $pts[0];
|
||||
|
||||
return $matches[1] . '#^[url=' . $matches[2] . ']' . $matches[2] . '[/url]' . $pts[0];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -303,9 +303,8 @@ function zot_zot($url, $data, $channel = null,$crypto = null) {
|
||||
|
||||
if($channel) {
|
||||
$headers['X-Zot-Token'] = random_string();
|
||||
$hash = \Zotlabs\Web\HTTPSig::generate_digest($data,false);
|
||||
$headers['X-Zot-Digest'] = 'SHA-256=' . $hash;
|
||||
$h = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'],'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,false,'sha512',(($crypto) ? $crypto['hubloc_sitekey'] : ''), (($crypto) ? zot_best_algorithm($crypto['site_crypto']) : ''));
|
||||
$headers['X-Zot-Digest'] = \Zotlabs\Web\HTTPSig::generate_digest_header($data);
|
||||
$h = \Zotlabs\Web\HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel),false,'sha512',(($crypto) ? $crypto['hubloc_sitekey'] : ''), (($crypto) ? zot_best_algorithm($crypto['site_crypto']) : ''));
|
||||
}
|
||||
|
||||
$redirects = 0;
|
||||
@ -2241,7 +2240,7 @@ function delete_imported_item($sender, $item, $uid, $relay) {
|
||||
$item_found = false;
|
||||
$post_id = 0;
|
||||
|
||||
$r = q("select id, author_xchan, owner_xchan, source_xchan, item_deleted from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' )
|
||||
$r = q("select * from item where ( author_xchan = '%s' or owner_xchan = '%s' or source_xchan = '%s' )
|
||||
and mid = '%s' and uid = %d limit 1",
|
||||
dbesc($sender['hash']),
|
||||
dbesc($sender['hash']),
|
||||
@ -2251,10 +2250,13 @@ function delete_imported_item($sender, $item, $uid, $relay) {
|
||||
);
|
||||
|
||||
if($r) {
|
||||
if($r[0]['author_xchan'] === $sender['hash'] || $r[0]['owner_xchan'] === $sender['hash'] || $r[0]['source_xchan'] === $sender['hash'])
|
||||
|
||||
$stored = $r[0];
|
||||
|
||||
if($stored['author_xchan'] === $sender['hash'] || $stored['owner_xchan'] === $sender['hash'] || $stored['source_xchan'] === $sender['hash'])
|
||||
$ownership_valid = true;
|
||||
|
||||
$post_id = $r[0]['id'];
|
||||
$post_id = $stored['id'];
|
||||
$item_found = true;
|
||||
}
|
||||
else {
|
||||
@ -2278,10 +2280,29 @@ function delete_imported_item($sender, $item, $uid, $relay) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($stored['resource_type'] === 'event') {
|
||||
$i = q("SELECT * FROM event WHERE event_hash = '%s' AND uid = %d LIMIT 1",
|
||||
dbesc($stored['resource_id']),
|
||||
intval($uid)
|
||||
);
|
||||
if ($i) {
|
||||
if ($i[0]['event_xchan'] === $sender['hash']) {
|
||||
q("delete from event where event_hash = '%s' and uid = %d",
|
||||
dbesc($stored['resource_id']),
|
||||
intval($uid)
|
||||
);
|
||||
}
|
||||
else {
|
||||
logger('delete linked event: not owner');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once('include/items.php');
|
||||
|
||||
if($item_found) {
|
||||
if(intval($r[0]['item_deleted'])) {
|
||||
if(intval($stored['item_deleted'])) {
|
||||
logger('delete_imported_item: item was already deleted');
|
||||
if(! $relay)
|
||||
return false;
|
||||
@ -2293,10 +2314,10 @@ function delete_imported_item($sender, $item, $uid, $relay) {
|
||||
// back, and we aren't going to (or shouldn't at any rate) delete it again in the future - so losing
|
||||
// this information from the metadata should have no other discernible impact.
|
||||
|
||||
if (($r[0]['id'] != $r[0]['parent']) && intval($r[0]['item_origin'])) {
|
||||
if (($stored['id'] != $stored['parent']) && intval($stored['item_origin'])) {
|
||||
q("update item set item_origin = 0 where id = %d and uid = %d",
|
||||
intval($r[0]['id']),
|
||||
intval($r[0]['uid'])
|
||||
intval($stored['id']),
|
||||
intval($stored['uid'])
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -4430,7 +4451,7 @@ function zotinfo($arr) {
|
||||
|
||||
$profile['description'] = $p[0]['pdesc'];
|
||||
$profile['birthday'] = $p[0]['dob'];
|
||||
if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],$e['channel_timezone'])) !== ''))
|
||||
if(($profile['birthday'] != '0000-00-00') && (($bd = z_birthday($p[0]['dob'],'UTC')) !== ''))
|
||||
$profile['next_birthday'] = $bd;
|
||||
|
||||
if($age = age($p[0]['dob'],$e['channel_timezone'],''))
|
||||
|
@ -83,7 +83,7 @@ web server platforms.
|
||||
Example config scripts are available for these platforms in the install
|
||||
directory. Apache and nginx have the most support.
|
||||
|
||||
- PHP 5.6 or later.
|
||||
- PHP 7.1 or later.
|
||||
|
||||
- PHP *command line* access with register_argc_argv set to true in the
|
||||
php.ini file - and with no hosting provider restrictions on the use of
|
||||
|
@ -1,7 +1,7 @@
|
||||
##
|
||||
## Bundle of CA Root Certificates
|
||||
##
|
||||
## Certificate data from Mozilla as of: Wed Jun 20 03:12:06 2018 GMT
|
||||
## Certificate data from Mozilla as of: Sat Jul 13 19:29:28 2019 GMT
|
||||
##
|
||||
## This is a bundle of X.509 certificates of public Certificate Authorities
|
||||
## (CA). These were automatically extracted from Mozilla's root certificates
|
||||
@ -14,7 +14,7 @@
|
||||
## Just configure this file as the SSLCACertificateFile.
|
||||
##
|
||||
## Conversion done with mk-ca-bundle.pl version 1.27.
|
||||
## SHA256: c80f571d9f4ebca4a91e0ad3a546f263153d71afffc845c6f8f52ce9d1a2e8ec
|
||||
## SHA256: 61eaa79ac46d923f2f74dfe401189424e96fa8736102b47ba2cdb4ea19af2cc8
|
||||
##
|
||||
|
||||
|
||||
@ -261,28 +261,6 @@ gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
|
||||
X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Visa eCommerce Root
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQ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9DjkCJzQ83z7+pz
|
||||
zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu
|
||||
YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
|
||||
398znM/jra6O1I7mT1GvFpLgXPYHDw==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Comodo AAA Services root
|
||||
========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
@ -2792,126 +2770,6 @@ GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn
|
||||
dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Certplus Root CA G1
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFazCCA1OgAwIBAgISESBVg+QtPlRWhS2DN7cs3EYRMA0GCSqGSIb3DQEBDQUAMD4xCzAJBgNV
|
||||
BAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTAe
|
||||
Fw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhD
|
||||
ZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTCCAiIwDQYJKoZIhvcNAQEBBQAD
|
||||
ggIPADCCAgoCggIBANpQh7bauKk+nWT6VjOaVj0W5QOVsjQcmm1iBdTYj+eJZJ+622SLZOZ5KmHN
|
||||
r49aiZFluVj8tANfkT8tEBXgfs+8/H9DZ6itXjYj2JizTfNDnjl8KvzsiNWI7nC9hRYt6kuJPKNx
|
||||
Qv4c/dMcLRC4hlTqQ7jbxofaqK6AJc96Jh2qkbBIb6613p7Y1/oA/caP0FG7Y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lXGEilX
|
||||
CNQ314cnrUlZp5GrRHpejXDbl85IULFzk/bwg2D5zfHhMf1bfHEhYxQUqq/F3pN+aLHsIqKqkHWe
|
||||
tUNy6mSjhEv9DKgma3GX7lZjZuhCVPnHHd/Qj1vfyDBviP4NxDMcU6ij/UgQ8uQKTuEVV/xuZDDC
|
||||
VRHc6qnNSlSsKWNEz0pAoNZoWRsz+e86i9sgktxChL8Bq4fA1SCC28a5g4VCXA9DO2pJNdWY9BW/
|
||||
+mGBDAkgGNLQFwzLSABQ6XaCjGTXOqAHVcweMcDvOrRl++O/QmueD6i9a5jc2NvLi6Td11n0bt3+
|
||||
qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Certplus Root CA G2
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4xCzAJBgNVBAYT
|
||||
AkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x
|
||||
NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0
|
||||
cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA
|
||||
BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN
|
||||
Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD
|
||||
AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud
|
||||
IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV
|
||||
HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl
|
||||
vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
OpenTrust Root CA G1
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUAMEAxCzAJBgNV
|
||||
BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcx
|
||||
MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
|
||||
CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEB
|
||||
AQUAA4ICDwAwggIKAoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7fa
|
||||
Yp6bwiTXj/HbpqbfRm9RpnHLPhsxZ2L3EVs0J9V5ToybWL0iEA1cJwzdMOWo010hOHQX/uMftk87
|
||||
ay3bfWAfjH1MBcLrARYVmBSO0ZB3Ij/swjm4eTrwSSTilZHcYTSSjFR077F9jAHiOH3BX2pfJLKO
|
||||
YheteSCtqx234LSWSE9mQxAGFiQD4eCcjsZGT44ameGPuY4zbGneWK2gDqdkVBFpRGZPTBKnjix9
|
||||
xNRbxQA0MMHZmf4yzgeEtE7NCv82TWLxp2NX5Ntqp66/K7nJ5rInieV+mhxNaMbBGN4zK1FGSxyO
|
||||
9z0M+Yo0FMT7MzUj8czxKselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq
|
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||||
4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJAwSQiumPv+i2tCqjI40cHLI5kqiPAlxA
|
||||
OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
OpenTrust Root CA G2
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUAMEAxCzAJBgNV
|
||||
BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcy
|
||||
MB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
|
||||
CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEB
|
||||
AQUAA4ICDwAwggIKAoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+
|
||||
Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz
|
||||
4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/61UWY0jUJ9gNDlP7ZvyCV
|
||||
eYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fEFY8ElggGQgT4hNYdvJGmQr5J1WqIP7wt
|
||||
UdGejeBSzFfdNTVY27SPJIjki9/ca1TSgSuyzpJLHB9G+h3Ykst2Z7UJmQnlrBcUVXDGPKBWCgOz
|
||||
3GIZ38i1MH/1PCZ1Eb3XG7OHngevZXHloM8apwkQHZOJZlvoPGIytbU6bumFAYueQ4xncyhZW+vj
|
||||
3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlw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9VGHgtPFGml4vm
|
||||
u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
OpenTrust Root CA G3
|
||||
====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT
|
||||
AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X
|
||||
DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w
|
||||
ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA
|
||||
IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B
|
||||
ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB
|
||||
/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf
|
||||
BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM
|
||||
BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta
|
||||
3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
ISRG Root X1
|
||||
============
|
||||
-----BEGIN CERTIFICATE-----
|
||||
@ -3312,122 +3170,338 @@ BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe
|
||||
N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm
|
||||
m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GlobalSign Root CA - R6
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGCDCCA/CgAwIBAgIQKy5u6tl1NmwUim7bo3yMBzANBgkqhkiG9w0BAQwFADCB
|
||||
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
|
||||
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
|
||||
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQwMjEy
|
||||
MDAwMDAwWhcNMjkwMjExMjM1OTU5WjCBkDELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
|
||||
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
|
||||
Q09NT0RPIENBIExpbWl0ZWQxNjA0BgNVBAMTLUNPTU9ETyBSU0EgRG9tYWluIFZh
|
||||
bGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
||||
ADCCAQoCggEBAI7CAhnhoFmk6zg1jSz9AdDTScBkxwtiBUUWOqigwAwCfx3M28Sh
|
||||
bXcDow+G+eMGnD4LgYqbSRutA776S9uMIO3Vzl5ljj4Nr0zCsLdFXlIvNN5IJGS0
|
||||
Qa4Al/e+Z96e0HqnU4A7fK31llVvl0cKfIWLIpeNs4TgllfQcBhglo/uLQeTnaG6
|
||||
ytHNe+nEKpooIZFNb5JPJaXyejXdJtxGpdC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75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfspA9MRf/T
|
||||
uTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+vJJUEeKgDu+6B5dpffItK
|
||||
oZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+t
|
||||
JDfLRVpOoERIyNiwmcUVhAn21klJwGW45hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
OISTE WISeKey Global Root GC CA
|
||||
===============================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFdDCCBFygAwIBAgIQJ2buVutJ846r13Ci/ITeIjANBgkqhkiG9w0BAQwFADBv
|
||||
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
|
||||
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
|
||||
eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow
|
||||
gYUxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
|
||||
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMSswKQYD
|
||||
VQQDEyJDT01PRE8gUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkq
|
||||
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAkehUktIKVrGsDSTdxc9EZ3SZKzejfSNw
|
||||
AHG8U9/E+ioSj0t/EFa9n3Byt2F/yUsPF6c947AEYe7/EZfH9IY+Cvo+XPmT5jR6
|
||||
2RRr55yzhaCCenavcZDX7P0N+pxs+t+wgvQUfvm+xKYvT3+Zf7X8Z0NyvQwA1onr
|
||||
ayzT7Y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YwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk
|
||||
AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GTS Root R1
|
||||
===========
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
|
||||
MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
|
||||
IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
|
||||
MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
|
||||
FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
|
||||
bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
|
||||
dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
|
||||
H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
|
||||
uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
|
||||
mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
|
||||
a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
|
||||
E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
|
||||
WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0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ruZRgyFmxhE+885H7pwoHyXa/6xm
|
||||
ld01D1zvICxi/ZG6qcz8WpyTgYMpl0p8WnK0OdC3d8t5/Wk6kjftbjhlRn7pYL15iJdfOBL07q9b
|
||||
gsiG1eGZbYwE8na6SfZu6W0eX6DvJ4J2QPim01hcDyxC2kLGe4g0x8HYRZvBPsVhHdljUEn2NIVq
|
||||
4BjFbkerQUIpm/ZgDdIx02OYI5NaAIFItO/Nis3Jz5nu2Z6qNuFoS3FJFDYoOj0dzpqPJeaAcWEr
|
||||
tXvM+SUWgeExX6GjfhaknBZqlxi9dnKlC54dNuYvoS++cJEPqOba+MSSQGwlfnuzCdyyF62ARPBo
|
||||
pY+Udf90WuioAnwMCeKpSwughQtiue+hMZL77/ZRBIls6Kl0obsXs7X9SQ98POyDGCBDTtWTurQ0
|
||||
sR8WNh8M5mQ5Fkzc4P4dyKliPUDqysU0ArSuiYgzNdwsE3PYJ/HQcu51OyLemGhmW/HGY0dVHLql
|
||||
CFF1pkgl
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GTS Root R2
|
||||
===========
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
|
||||
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
|
||||
DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
|
||||
SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
|
||||
GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
|
||||
AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
|
||||
q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan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FBcOEArf9LAhST4Ld
|
||||
o/DUhgkC
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GTS Root R3
|
||||
===========
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV
|
||||
UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
|
||||
UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
|
||||
ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq
|
||||
hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU
|
||||
Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej
|
||||
QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP
|
||||
0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0
|
||||
glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa
|
||||
KaqW04MjyaR7YbPMAuhd
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
GTS Root R4
|
||||
===========
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV
|
||||
UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
|
||||
UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
|
||||
ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq
|
||||
hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa
|
||||
6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj
|
||||
QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV
|
||||
2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNnADBkAjBqUFJ0CMRw3J5QdCHojXohw0+WbhXRIjVhLfoI
|
||||
N+4Zba3bssx9BzT1YBkstTTZbyACMANxsbqjYAuG7ZoIapVon+Kz4ZNkfF6Tpt95LY2F45TPI11x
|
||||
zPKwTdb+mciUqXWi4w==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
UCA Global G2 Root
|
||||
==================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQG
|
||||
EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBHbG9iYWwgRzIgUm9vdDAeFw0x
|
||||
NjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0xCzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlU
|
||||
cnVzdDEbMBkGA1UEAwwSVUNBIEdsb2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
|
||||
MIICCgKCAgEAxeYrb3zvJgU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XHzJsBPd+aBJ9J3O5oUb3n09tDh05S60FdRvScFDcH9
|
||||
yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LVPtateJLbXDzz2K36uGt/xDYotgIVilQsnLAX
|
||||
c47QN6MUPJiVAAwpBVueSUmxX8fjy88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHo
|
||||
jhJi6IjMtX9Gl8CbEGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZk
|
||||
bxqgDMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI+Vg7RE+x
|
||||
ygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGyYiGqhkCyLmTTX8jjfhFn
|
||||
RR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bXUB+K+wb1whnw0A==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
UCA Extended Validation Root
|
||||
============================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG
|
||||
EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u
|
||||
IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G
|
||||
A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi
|
||||
MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs
|
||||
iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBes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+rG761KIcSF3Ru/H38j9CHJrAb
|
||||
+7lsq+KePRXBOy5nAliRn+/4Qh8st2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOW
|
||||
F3sGPjLtx7dCvHaj2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwi
|
||||
GpWOvpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2CxR9GUeOc
|
||||
GMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmxcmtpzyKEC2IPrNkZAJSi
|
||||
djzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbMfjKaiJUINlK73nZfdklJrX+9ZSCyycEr
|
||||
dhh2n1ax
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Certigna Root CA
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAwWjELMAkGA1UE
|
||||
BhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAwMiA0ODE0NjMwODEwMDAzNjEZ
|
||||
MBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0xMzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjda
|
||||
MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz
|
||||
MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC
|
||||
DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX
|
||||
stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qX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lQgi581oQfccVdV8AOIt
|
||||
OoldaDgvUSILSo3L6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxP
|
||||
TGRGHVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH60BGM+RFq
|
||||
7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncBlA2c5uk5jR+mUYyZDDl3
|
||||
4bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdio2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd
|
||||
8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS
|
||||
6Cvu5zHbugRqh5jnxV/vfaci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaY
|
||||
tlu3zM63Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayhjWZS
|
||||
aX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw3kAP+HwV96LOPNde
|
||||
E4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
emSign Root CA - G1
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJJTjET
|
||||
MBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRl
|
||||
ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx
|
||||
ODMwMDBaMGcxCzAJBgNVBAYTA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----END CERTIFICATE-----
|
||||
|
||||
emSign ECC Root CA - G3
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQGEwJJTjETMBEG
|
||||
A1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEg
|
||||
MB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4
|
||||
MTgzMDAwWjBrMQswCQYDVQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11
|
||||
ZGhyYSBUZWNobm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g
|
||||
RzMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0WXTsuwYc
|
||||
58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xySfvalY8L1X44uT6EYGQIr
|
||||
MgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuBzhccLikenEhjQjAOBgNVHQ8BAf8EBAMC
|
||||
AQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+D
|
||||
CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7
|
||||
jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
emSign Root CA - C1
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkG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1DU/rl7mYw9
|
||||
wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ
|
||||
BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
emSign ECC Root CA - C3
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG
|
||||
A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF
|
||||
Q0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UE
|
||||
BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQD
|
||||
ExdlbVNpZ24gRUNDIFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd
|
||||
6bciMK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4OjavtisIGJAnB9
|
||||
SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0OBBYEFPtaSNCAIEDyqOkA
|
||||
B2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49BAMDA2gA
|
||||
MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU
|
||||
ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Hongkong Post Root CA 3
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG
|
||||
A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK
|
||||
Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2
|
||||
MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv
|
||||
bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX
|
||||
SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz
|
||||
iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf
|
||||
jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim
|
||||
5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe
|
||||
sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj
|
||||
0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/
|
||||
JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u
|
||||
y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8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DJGcn5fq
|
||||
dBb9HxEGmpv0
|
||||
-----END CERTIFICATE-----
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,127 +0,0 @@
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
Each bug report MUST have a [JSFiddle/JSBin] recreation before any work can begin. [further instructions »](http://fullcalendar.io/wiki/Reporting-Bugs/)
|
||||
|
||||
|
||||
## Requesting Features
|
||||
|
||||
Please search the [Issue Tracker] to see if your feature has already been requested, and if so, subscribe to it. Otherwise, read these [further instructions »](http://fullcalendar.io/wiki/Requesting-Features/)
|
||||
|
||||
|
||||
## Contributing Features
|
||||
|
||||
The FullCalendar project welcomes [Pull Requests][Using Pull Requests] for new features, but because there are so many feature requests (over 100), and because every new feature requires refinement and maintenance, each PR will be prioritized against the project's other demands and might take a while to make it to an official release.
|
||||
|
||||
Furthermore, each new feature should be designed as robustly as possible and be useful beyond the immediate usecase it was initially designed for. Feel free to start a ticket discussing the feature's specs before coding.
|
||||
|
||||
|
||||
## Contributing Bugfixes
|
||||
|
||||
In the description of your [Pull Request][Using Pull Requests], please include recreation steps for the bug as well as a [JSFiddle/JSBin] demo. Communicating the buggy behavior is a requirement before a merge can happen.
|
||||
|
||||
|
||||
## Contributing Locales
|
||||
|
||||
Please edit the original files in the `locale/` directory. DO NOT edit anything in the `dist/` directory. The build system will responsible for merging FullCalendar's `locale/` data with the [MomentJS locale data].
|
||||
|
||||
|
||||
## Other Ways to Contribute
|
||||
|
||||
[Read about other ways to contribute »](http://fullcalendar.io/wiki/Contributing/)
|
||||
|
||||
|
||||
## Getting Set Up
|
||||
|
||||
You will need [Git][git], [Node][node], and NPM installed. For clarification, please view the [jQuery readme][jq-readme], which requires a similar setup.
|
||||
|
||||
Also, you will need the [gulp-cli][gulp-cli] package installed globally (`-g`) on your system:
|
||||
|
||||
npm install -g gulp-cli
|
||||
|
||||
Then, clone FullCalendar's git repo:
|
||||
|
||||
git clone git://github.com/fullcalendar/fullcalendar.git
|
||||
|
||||
Enter the directory and install FullCalendar's dependencies:
|
||||
|
||||
cd fullcalendar
|
||||
npm install
|
||||
|
||||
|
||||
## What to edit
|
||||
|
||||
When modifying files, please do not edit the generated or minified files in the `dist/` directory. Please edit the original `src/` files.
|
||||
|
||||
|
||||
## Development Workflow
|
||||
|
||||
After you make code changes, you'll want to compile the JS/CSS so that it can be previewed from the tests and demos. You can either manually rebuild each time you make a change:
|
||||
|
||||
gulp dev
|
||||
|
||||
Or, you can run a script that automatically rebuilds whenever you save a source file:
|
||||
|
||||
gulp watch
|
||||
|
||||
When you are finished, run the following command to write the distributable files into the `./dist/` directory:
|
||||
|
||||
gulp dist
|
||||
|
||||
If you want to clean up the generated files, run:
|
||||
|
||||
gulp clean
|
||||
|
||||
|
||||
## Style Guide
|
||||
|
||||
Please follow the [Google JavaScript Style Guide] as closely as possible. With the following exceptions:
|
||||
|
||||
```js
|
||||
if (true) {
|
||||
}
|
||||
else { // please put else, else if, and catch on a separate line
|
||||
}
|
||||
|
||||
// please write one-line array literals with a one-space padding inside
|
||||
var a = [ 1, 2, 3 ];
|
||||
|
||||
// please write one-line object literals with a one-space padding inside
|
||||
var o = { a: 1, b: 2, c: 3 };
|
||||
```
|
||||
|
||||
Other exceptions:
|
||||
|
||||
- please ignore anything about Google Closure Compiler or the `goog` library
|
||||
- please do not write JSDoc comments
|
||||
|
||||
Notes about whitespace:
|
||||
|
||||
- **use *tabs* instead of spaces**
|
||||
- separate functions with *2* blank lines
|
||||
- separate logical blocks within functions with *1* blank line
|
||||
|
||||
Run the command line tool to automatically check your style:
|
||||
|
||||
gulp lint
|
||||
|
||||
|
||||
## Before Submitting your Code
|
||||
|
||||
If you have edited code (including **tests** and **translations**) and would like to submit a pull request, please make sure you have done the following:
|
||||
|
||||
1. Conformed to the style guide (successfully run `gulp lint`)
|
||||
|
||||
2. Written automated tests. View the [Automated Test Readme]
|
||||
|
||||
|
||||
[JSFiddle/JSBin]: http://fullcalendar.io/wiki/Reporting-Bugs/
|
||||
[Issue Tracker]: https://github.com/fullcalendar/fullcalendar/issues
|
||||
[Using Pull Requests]: https://help.github.com/articles/using-pull-requests/
|
||||
[MomentJS locale data]: https://github.com/moment/moment/tree/develop/locale
|
||||
[git]: http://git-scm.com/
|
||||
[node]: http://nodejs.org/
|
||||
[gulp-cli]: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md
|
||||
[jq-readme]: https://github.com/jquery/jquery/blob/master/README.md#what-you-need-to-build-your-own-jquery
|
||||
[Google JavaScript Style Guide]: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
|
||||
[Automated Test Readme]: https://github.com/fullcalendar/fullcalendar/wiki/Automated-Tests
|
@ -1,20 +0,0 @@
|
||||
Copyright (c) 2015 Adam Shaw
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights 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 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.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
10
library/fullcalendar.old/fullcalendar.min.js
vendored
10
library/fullcalendar.old/fullcalendar.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,208 +0,0 @@
|
||||
/*!
|
||||
* FullCalendar v3.2.0 Print Stylesheet
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include this stylesheet on your page to get a more printer-friendly calendar.
|
||||
* When including this stylesheet, use the media='print' attribute of the <link> tag.
|
||||
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
|
||||
*/
|
||||
|
||||
.fc {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
|
||||
/* Global Event Restyling
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
.fc-event {
|
||||
background: #fff !important;
|
||||
color: #000 !important;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.fc-event .fc-resizer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Table & Day-Row Restyling
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
.fc th,
|
||||
.fc td,
|
||||
.fc hr,
|
||||
.fc thead,
|
||||
.fc tbody,
|
||||
.fc-row {
|
||||
border-color: #ccc !important;
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
/* kill the overlaid, absolutely-positioned components */
|
||||
/* common... */
|
||||
.fc-bg,
|
||||
.fc-bgevent-skeleton,
|
||||
.fc-highlight-skeleton,
|
||||
.fc-helper-skeleton,
|
||||
/* for timegrid. within cells within table skeletons... */
|
||||
.fc-bgevent-container,
|
||||
.fc-business-container,
|
||||
.fc-highlight-container,
|
||||
.fc-helper-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* don't force a min-height on rows (for DayGrid) */
|
||||
.fc tbody .fc-row {
|
||||
height: auto !important; /* undo height that JS set in distributeHeight */
|
||||
min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */
|
||||
}
|
||||
|
||||
.fc tbody .fc-row .fc-content-skeleton {
|
||||
position: static; /* undo .fc-rigid */
|
||||
padding-bottom: 0 !important; /* use a more border-friendly method for this... */
|
||||
}
|
||||
|
||||
.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */
|
||||
padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */
|
||||
}
|
||||
|
||||
.fc tbody .fc-row .fc-content-skeleton table {
|
||||
/* provides a min-height for the row, but only effective for IE, which exaggerates this value,
|
||||
making it look more like 3em. for other browers, it will already be this tall */
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* Undo month-view event limiting. Display all events and hide the "more" links
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
.fc-more-cell,
|
||||
.fc-more {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.fc tr.fc-limited {
|
||||
display: table-row !important;
|
||||
}
|
||||
|
||||
.fc td.fc-limited {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
||||
.fc-popover {
|
||||
display: none; /* never display the "more.." popover in print mode */
|
||||
}
|
||||
|
||||
|
||||
/* TimeGrid Restyling
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* undo the min-height 100% trick used to fill the container's height */
|
||||
.fc-time-grid {
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
||||
/* don't display the side axis at all ("all-day" and time cells) */
|
||||
.fc-agenda-view .fc-axis {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* don't display the horizontal lines */
|
||||
.fc-slats,
|
||||
.fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */
|
||||
display: none !important; /* important overrides inline declaration */
|
||||
}
|
||||
|
||||
/* let the container that holds the events be naturally positioned and create real height */
|
||||
.fc-time-grid .fc-content-skeleton {
|
||||
position: static;
|
||||
}
|
||||
|
||||
/* in case there are no events, we still want some height */
|
||||
.fc-time-grid .fc-content-skeleton table {
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
/* kill the horizontal spacing made by the event container. event margins will be done below */
|
||||
.fc-time-grid .fc-event-container {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
/* TimeGrid *Event* Restyling
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* naturally position events, vertically stacking them */
|
||||
.fc-time-grid .fc-event {
|
||||
position: static !important;
|
||||
margin: 3px 2px !important;
|
||||
}
|
||||
|
||||
/* for events that continue to a future day, give the bottom border back */
|
||||
.fc-time-grid .fc-event.fc-not-end {
|
||||
border-bottom-width: 1px !important;
|
||||
}
|
||||
|
||||
/* indicate the event continues via "..." text */
|
||||
.fc-time-grid .fc-event.fc-not-end:after {
|
||||
content: "...";
|
||||
}
|
||||
|
||||
/* for events that are continuations from previous days, give the top border back */
|
||||
.fc-time-grid .fc-event.fc-not-start {
|
||||
border-top-width: 1px !important;
|
||||
}
|
||||
|
||||
/* indicate the event is a continuation via "..." text */
|
||||
.fc-time-grid .fc-event.fc-not-start:before {
|
||||
content: "...";
|
||||
}
|
||||
|
||||
/* time */
|
||||
|
||||
/* undo a previous declaration and let the time text span to a second line */
|
||||
.fc-time-grid .fc-event .fc-time {
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
/* hide the the time that is normally displayed... */
|
||||
.fc-time-grid .fc-event .fc-time span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
|
||||
.fc-time-grid .fc-event .fc-time:after {
|
||||
content: attr(data-full);
|
||||
}
|
||||
|
||||
|
||||
/* Vertical Scroller & Containers
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* kill the scrollbars and allow natural height */
|
||||
.fc-scroller,
|
||||
.fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */
|
||||
.fc-time-grid-container { /* */
|
||||
overflow: visible !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
/* kill the horizontal border/padding used to compensate for scrollbars */
|
||||
.fc-row {
|
||||
border: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
/* Button Controls
|
||||
--------------------------------------------------------------------------------------------------*/
|
||||
|
||||
.fc-button-group,
|
||||
.fc button {
|
||||
display: none; /* don't display any button-related controls */
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
/*!
|
||||
* FullCalendar v3.2.0 Print Stylesheet
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
*/.fc-bg,.fc-bgevent-container,.fc-bgevent-skeleton,.fc-business-container,.fc-event .fc-resizer,.fc-helper-container,.fc-helper-skeleton,.fc-highlight-container,.fc-highlight-skeleton{display:none}.fc tbody .fc-row,.fc-time-grid{min-height:0!important}.fc-time-grid .fc-event.fc-not-end:after,.fc-time-grid .fc-event.fc-not-start:before{content:"..."}.fc{max-width:100%!important}.fc-event{background:#fff!important;color:#000!important;page-break-inside:avoid}.fc hr,.fc tbody,.fc td,.fc th,.fc thead,.fc-row{border-color:#ccc!important;background:#fff!important}.fc tbody .fc-row{height:auto!important}.fc tbody .fc-row .fc-content-skeleton{position:static;padding-bottom:0!important}.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td{padding-bottom:1em}.fc tbody .fc-row .fc-content-skeleton table{height:1em}.fc-more,.fc-more-cell{display:none!important}.fc tr.fc-limited{display:table-row!important}.fc td.fc-limited{display:table-cell!important}.fc-agenda-view .fc-axis,.fc-popover{display:none}.fc-slats,.fc-time-grid hr{display:none!important}.fc button,.fc-button-group,.fc-time-grid .fc-event .fc-time span{display:none}.fc-time-grid .fc-content-skeleton{position:static}.fc-time-grid .fc-content-skeleton table{height:4em}.fc-time-grid .fc-event-container{margin:0!important}.fc-time-grid .fc-event{position:static!important;margin:3px 2px!important}.fc-time-grid .fc-event.fc-not-end{border-bottom-width:1px!important}.fc-time-grid .fc-event.fc-not-start{border-top-width:1px!important}.fc-time-grid .fc-event .fc-time{white-space:normal!important}.fc-time-grid .fc-event .fc-time:after{content:attr(data-full)}.fc-day-grid-container,.fc-scroller,.fc-time-grid-container{overflow:visible!important;height:auto!important}.fc-row{border:0!important;margin:0!important}
|
@ -1,180 +0,0 @@
|
||||
/*!
|
||||
* FullCalendar v3.2.0 Google Calendar Plugin
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
*/
|
||||
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([ 'jquery' ], factory);
|
||||
}
|
||||
else if (typeof exports === 'object') { // Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
}
|
||||
else {
|
||||
factory(jQuery);
|
||||
}
|
||||
})(function($) {
|
||||
|
||||
|
||||
var API_BASE = 'https://www.googleapis.com/calendar/v3/calendars';
|
||||
var FC = $.fullCalendar;
|
||||
var applyAll = FC.applyAll;
|
||||
|
||||
|
||||
FC.sourceNormalizers.push(function(sourceOptions) {
|
||||
var googleCalendarId = sourceOptions.googleCalendarId;
|
||||
var url = sourceOptions.url;
|
||||
var match;
|
||||
|
||||
// if the Google Calendar ID hasn't been explicitly defined
|
||||
if (!googleCalendarId && url) {
|
||||
|
||||
// detect if the ID was specified as a single string.
|
||||
// will match calendars like "asdf1234@calendar.google.com" in addition to person email calendars.
|
||||
if (/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url)) {
|
||||
googleCalendarId = url;
|
||||
}
|
||||
// try to scrape it out of a V1 or V3 API feed URL
|
||||
else if (
|
||||
(match = /^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(url)) ||
|
||||
(match = /^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(url))
|
||||
) {
|
||||
googleCalendarId = decodeURIComponent(match[1]);
|
||||
}
|
||||
|
||||
if (googleCalendarId) {
|
||||
sourceOptions.googleCalendarId = googleCalendarId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (googleCalendarId) { // is this a Google Calendar?
|
||||
|
||||
// make each Google Calendar source uneditable by default
|
||||
if (sourceOptions.editable == null) {
|
||||
sourceOptions.editable = false;
|
||||
}
|
||||
|
||||
// We want removeEventSource to work, but it won't know about the googleCalendarId primitive.
|
||||
// Shoehorn it into the url, which will function as the unique primitive. Won't cause side effects.
|
||||
// This hack is obsolete since 2.2.3, but keep it so this plugin file is compatible with old versions.
|
||||
sourceOptions.url = googleCalendarId;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
FC.sourceFetchers.push(function(sourceOptions, start, end, timezone) {
|
||||
if (sourceOptions.googleCalendarId) {
|
||||
return transformOptions(sourceOptions, start, end, timezone, this); // `this` is the calendar
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function transformOptions(sourceOptions, start, end, timezone, calendar) {
|
||||
var url = API_BASE + '/' + encodeURIComponent(sourceOptions.googleCalendarId) + '/events?callback=?'; // jsonp
|
||||
var apiKey = sourceOptions.googleCalendarApiKey || calendar.options.googleCalendarApiKey;
|
||||
var success = sourceOptions.success;
|
||||
var data;
|
||||
var timezoneArg; // populated when a specific timezone. escaped to Google's liking
|
||||
|
||||
function reportError(message, apiErrorObjs) {
|
||||
var errorObjs = apiErrorObjs || [ { message: message } ]; // to be passed into error handlers
|
||||
|
||||
// call error handlers
|
||||
(sourceOptions.googleCalendarError || $.noop).apply(calendar, errorObjs);
|
||||
(calendar.options.googleCalendarError || $.noop).apply(calendar, errorObjs);
|
||||
|
||||
// print error to debug console
|
||||
FC.warn.apply(null, [ message ].concat(apiErrorObjs || []));
|
||||
}
|
||||
|
||||
if (!apiKey) {
|
||||
reportError("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/");
|
||||
return {}; // an empty source to use instead. won't fetch anything.
|
||||
}
|
||||
|
||||
// The API expects an ISO8601 datetime with a time and timezone part.
|
||||
// Since the calendar's timezone offset isn't always known, request the date in UTC and pad it by a day on each
|
||||
// side, guaranteeing we will receive all events in the desired range, albeit a superset.
|
||||
// .utc() will set a zone and give it a 00:00:00 time.
|
||||
if (!start.hasZone()) {
|
||||
start = start.clone().utc().add(-1, 'day');
|
||||
}
|
||||
if (!end.hasZone()) {
|
||||
end = end.clone().utc().add(1, 'day');
|
||||
}
|
||||
|
||||
// when sending timezone names to Google, only accepts underscores, not spaces
|
||||
if (timezone && timezone != 'local') {
|
||||
timezoneArg = timezone.replace(' ', '_');
|
||||
}
|
||||
|
||||
data = $.extend({}, sourceOptions.data || {}, {
|
||||
key: apiKey,
|
||||
timeMin: start.format(),
|
||||
timeMax: end.format(),
|
||||
timeZone: timezoneArg,
|
||||
singleEvents: true,
|
||||
maxResults: 9999
|
||||
});
|
||||
|
||||
return $.extend({}, sourceOptions, {
|
||||
googleCalendarId: null, // prevents source-normalizing from happening again
|
||||
url: url,
|
||||
data: data,
|
||||
startParam: false, // `false` omits this parameter. we already included it above
|
||||
endParam: false, // same
|
||||
timezoneParam: false, // same
|
||||
success: function(data) {
|
||||
var events = [];
|
||||
var successArgs;
|
||||
var successRes;
|
||||
|
||||
if (data.error) {
|
||||
reportError('Google Calendar API: ' + data.error.message, data.error.errors);
|
||||
}
|
||||
else if (data.items) {
|
||||
$.each(data.items, function(i, entry) {
|
||||
var url = entry.htmlLink || null;
|
||||
|
||||
// make the URLs for each event show times in the correct timezone
|
||||
if (timezoneArg && url !== null) {
|
||||
url = injectQsComponent(url, 'ctz=' + timezoneArg);
|
||||
}
|
||||
|
||||
events.push({
|
||||
id: entry.id,
|
||||
title: entry.summary,
|
||||
start: entry.start.dateTime || entry.start.date, // try timed. will fall back to all-day
|
||||
end: entry.end.dateTime || entry.end.date, // same
|
||||
url: url,
|
||||
location: entry.location,
|
||||
description: entry.description
|
||||
});
|
||||
});
|
||||
|
||||
// call the success handler(s) and allow it to return a new events array
|
||||
successArgs = [ events ].concat(Array.prototype.slice.call(arguments, 1)); // forward other jq args
|
||||
successRes = applyAll(success, this, successArgs);
|
||||
if ($.isArray(successRes)) {
|
||||
return successRes;
|
||||
}
|
||||
}
|
||||
|
||||
return events;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Injects a string like "arg=value" into the querystring of a URL
|
||||
function injectQsComponent(url, component) {
|
||||
// inject it after the querystring but before the fragment
|
||||
return url.replace(/(\?.*?)?(#|$)/, function(whole, qs, hash) {
|
||||
return (qs ? qs + '&' : '?') + component + hash;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
6
library/fullcalendar.old/gcal.min.js
vendored
6
library/fullcalendar.old/gcal.min.js
vendored
@ -1,6 +0,0 @@
|
||||
/*!
|
||||
* FullCalendar v3.2.0 Google Calendar Plugin
|
||||
* Docs & License: https://fullcalendar.io/
|
||||
* (c) 2017 Adam Shaw
|
||||
*/
|
||||
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function a(a,t,d,c,i){function s(o,r){var l=r||[{message:o}];(a.googleCalendarError||e.noop).apply(i,l),(i.options.googleCalendarError||e.noop).apply(i,l),n.warn.apply(null,[o].concat(r||[]))}var u,g,p=r+"/"+encodeURIComponent(a.googleCalendarId)+"/events?callback=?",m=a.googleCalendarApiKey||i.options.googleCalendarApiKey,f=a.success;return m?(t.hasZone()||(t=t.clone().utc().add(-1,"day")),d.hasZone()||(d=d.clone().utc().add(1,"day")),c&&"local"!=c&&(g=c.replace(" ","_")),u=e.extend({},a.data||{},{key:m,timeMin:t.format(),timeMax:d.format(),timeZone:g,singleEvents:!0,maxResults:9999}),e.extend({},a,{googleCalendarId:null,url:p,data:u,startParam:!1,endParam:!1,timezoneParam:!1,success:function(a){var r,n,t=[];if(a.error)s("Google Calendar API: "+a.error.message,a.error.errors);else if(a.items&&(e.each(a.items,function(e,a){var r=a.htmlLink||null;g&&null!==r&&(r=o(r,"ctz="+g)),t.push({id:a.id,title:a.summary,start:a.start.dateTime||a.start.date,end:a.end.dateTime||a.end.date,url:r,location:a.location,description:a.description})}),r=[t].concat(Array.prototype.slice.call(arguments,1)),n=l(f,this,r),e.isArray(n)))return n;return t}})):(s("Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"),{})}function o(e,a){return e.replace(/(\?.*?)?(#|$)/,function(e,o,r){return(o?o+"&":"?")+a+r})}var r="https://www.googleapis.com/calendar/v3/calendars",n=e.fullCalendar,l=n.applyAll;n.sourceNormalizers.push(function(e){var a,o=e.googleCalendarId,r=e.url;!o&&r&&(/^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(r)?o=r:((a=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^\/]*)/.exec(r))||(a=/^https?:\/\/www.google.com\/calendar\/feeds\/([^\/]*)/.exec(r)))&&(o=decodeURIComponent(a[1])),o&&(e.googleCalendarId=o)),o&&(null==e.editable&&(e.editable=!1),e.url=o)}),n.sourceFetchers.push(function(e,o,r,n){if(e.googleCalendarId)return a(e,o,r,n,this)})});
|
File diff suppressed because one or more lines are too long
@ -43,45 +43,30 @@ class PermissionDescriptionTest extends UnitTestCase {
|
||||
function testGenerate_digest($text, $digest) {
|
||||
$this->assertSame(
|
||||
$digest,
|
||||
HTTPSig::generate_digest($text, false)
|
||||
HTTPSig::generate_digest_header($text)
|
||||
);
|
||||
}
|
||||
public function generate_digestProvider() {
|
||||
return [
|
||||
'empty body text' => [
|
||||
'',
|
||||
'47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
|
||||
'SHA-256=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
|
||||
],
|
||||
'sample body text' => [
|
||||
'body text',
|
||||
'2fu8kUkvuzuo5XyhWwORNOcJgDColXgxWkw1T5EXzPI='
|
||||
'SHA-256=2fu8kUkvuzuo5XyhWwORNOcJgDColXgxWkw1T5EXzPI='
|
||||
],
|
||||
'NULL body text' => [
|
||||
null,
|
||||
'47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
|
||||
'SHA-256=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
function testGeneratedDigestsOfDifferentTextShouldNotBeEqual() {
|
||||
$this->assertNotSame(
|
||||
HTTPSig::generate_digest('text1', false),
|
||||
HTTPSig::generate_digest('text2', false)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process separation needed for header() check.
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
function testGenerate_digestSendsHttpHeader() {
|
||||
$ret = HTTPSig::generate_digest('body text', true);
|
||||
|
||||
$this->assertSame('2fu8kUkvuzuo5XyhWwORNOcJgDColXgxWkw1T5EXzPI=', $ret);
|
||||
$this->assertContains(
|
||||
'Digest: SHA-256=2fu8kUkvuzuo5XyhWwORNOcJgDColXgxWkw1T5EXzPI=',
|
||||
xdebug_get_headers(),
|
||||
'HTTP header Digest does not match'
|
||||
HTTPSig::generate_digest_header('text1'),
|
||||
HTTPSig::generate_digest_header('text2')
|
||||
);
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,8 +45,8 @@ if($argc == 2) {
|
||||
break;
|
||||
}
|
||||
|
||||
$x = q("SELECT DISTINCT resource_id, content FROM photo WHERE photo_usage = 0 AND os_storage = 1 AND imgscale = 0");
|
||||
|
||||
$x = q("SELECT resource_id, content FROM photo WHERE photo_usage = 0 AND os_storage = 1 AND imgscale = 0");
|
||||
|
||||
if($x) {
|
||||
foreach($x as $xx) {
|
||||
|
||||
@ -54,12 +54,15 @@ if($argc == 2) {
|
||||
dbesc($xx['resource_id']),
|
||||
$storage
|
||||
);
|
||||
|
||||
$img_path = dbunescbin($xx['content']);
|
||||
|
||||
foreach($n as $nn) {
|
||||
|
||||
echo '.';
|
||||
|
||||
$filename = dbunescbin($xx['content']) . '-' . $nn['imgscale'];
|
||||
$filename = $img_path . '-' . $nn['imgscale'];
|
||||
|
||||
if(! file_put_contents($filename, dbunescbin($nn['content']))) {
|
||||
echo 'Failed to save file ' . $filename . PHP_EOL;
|
||||
continue;
|
||||
@ -85,7 +88,7 @@ if($argc == 2) {
|
||||
break;
|
||||
}
|
||||
|
||||
$x = q("SELECT DISTINCT resource_id FROM photo WHERE photo_usage = 0 AND os_storage = 1 AND imgscale = 0");
|
||||
$x = q("SELECT resource_id FROM photo WHERE photo_usage = 0 AND os_storage = 1 AND imgscale = 0");
|
||||
|
||||
if($x) {
|
||||
foreach($x as $xx) {
|
||||
|
74
util/thumbrepair
Executable file
74
util/thumbrepair
Executable file
@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
// Recreate local thumbnails
|
||||
require_once('include/cli_startup.php');
|
||||
require_once('include/photo/photo_driver.php');
|
||||
|
||||
cli_startup();
|
||||
|
||||
$x = q("SELECT resource_id, content, width, height, mimetype, os_path FROM photo WHERE photo_usage = 0 AND os_storage = 1 AND imgscale = 0");
|
||||
|
||||
if($x) {
|
||||
foreach($x as $xx) {
|
||||
|
||||
$im = photo_factory(@file_get_contents(dbunescbin($xx['content'])), $xx['mimetype']);
|
||||
|
||||
$width = $xx['width'];
|
||||
$height = $xx['height'];
|
||||
|
||||
$n = q("SELECT * FROM photo WHERE resource_id = '%s' AND imgscale > 0",
|
||||
dbesc($xx['resource_id'])
|
||||
);
|
||||
|
||||
foreach($n as $nn) {
|
||||
|
||||
echo $nn['imgscale'];
|
||||
|
||||
$nn['os_path'] = $xx['os_path'];
|
||||
|
||||
switch ($nn['imgscale']) {
|
||||
case 1:
|
||||
if($width > 1024 || $height > 1024)
|
||||
$im->scaleImage(1024);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_1024);
|
||||
break;
|
||||
case 2:
|
||||
if($width > 640 || $height > 640)
|
||||
$im->scaleImage(640);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_640);
|
||||
break;
|
||||
case 3:
|
||||
if($width > 320 || $height > 320)
|
||||
$im->scaleImage(320);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_320);
|
||||
break;
|
||||
case 4:
|
||||
$im->scaleImage(300);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_PROFILE_300);
|
||||
break;
|
||||
case 5:
|
||||
$im->scaleImage(80);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_PROFILE_80);
|
||||
break;
|
||||
case 6:
|
||||
$im->scaleImage(48);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_PROFILE_48);
|
||||
break;
|
||||
case 7:
|
||||
$im->doScaleImage(1200,435);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_COVER_1200);
|
||||
break;
|
||||
case 8:
|
||||
$im->doScaleImage(850,310);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_COVER_850);
|
||||
break;
|
||||
case 9:
|
||||
$im->doScaleImage(425,160);
|
||||
$im->storeThumbnail($nn, PHOTO_RES_COVER_425);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
vendor/blueimp/jquery-file-upload/bower.json
vendored
2
vendor/blueimp/jquery-file-upload/bower.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blueimp-file-upload",
|
||||
"version": "9.30.0",
|
||||
"version": "9.31.0",
|
||||
"title": "jQuery File Upload",
|
||||
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images.",
|
||||
"keywords": [
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blueimp-file-upload",
|
||||
"version": "9.30.0",
|
||||
"version": "9.31.0",
|
||||
"title": "jQuery File Upload",
|
||||
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
|
||||
"keywords": [
|
||||
|
@ -43,9 +43,9 @@ class UploadHandler
|
||||
const IMAGETYPE_PNG = 3;
|
||||
|
||||
protected $image_objects = array();
|
||||
protected $response = array();
|
||||
|
||||
public function __construct($options = null, $initialize = true, $error_messages = null) {
|
||||
$this->response = array();
|
||||
$this->options = array(
|
||||
'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')),
|
||||
'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/',
|
||||
@ -75,12 +75,12 @@ class UploadHandler
|
||||
),
|
||||
// By default, allow redirects to the referer protocol+host:
|
||||
'redirect_allow_target' => '/^'.preg_quote(
|
||||
parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME)
|
||||
.'://'
|
||||
.parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST)
|
||||
.'/', // Trailing slash to not match subdomains by mistake
|
||||
'/' // preg_quote delimiter param
|
||||
).'/',
|
||||
parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_SCHEME)
|
||||
.'://'
|
||||
.parse_url($this->get_server_var('HTTP_REFERER'), PHP_URL_HOST)
|
||||
.'/', // Trailing slash to not match subdomains by mistake
|
||||
'/' // preg_quote delimiter param
|
||||
).'/',
|
||||
// Enable to provide file downloads via GET requests to the PHP script:
|
||||
// 1. Set to 1 to download files via readfile method through PHP
|
||||
// 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache
|
||||
@ -151,21 +151,21 @@ class UploadHandler
|
||||
'identify_bin' => 'identify',
|
||||
'image_versions' => array(
|
||||
// The empty image version key defines options for the original image.
|
||||
// Keep in mind: these image manipulations are inherited by all other image versions from this point onwards.
|
||||
// Keep in mind: these image manipulations are inherited by all other image versions from this point onwards.
|
||||
// Also note that the property 'no_cache' is not inherited, since it's not a manipulation.
|
||||
'' => array(
|
||||
// Automatically rotate images based on EXIF meta data:
|
||||
'auto_orient' => true
|
||||
),
|
||||
// You can add arrays to generate different versions.
|
||||
// The name of the key is the name of the version (example: 'medium').
|
||||
// The name of the key is the name of the version (example: 'medium').
|
||||
// the array contains the options to apply.
|
||||
/*
|
||||
'medium' => array(
|
||||
'max_width' => 800,
|
||||
'max_height' => 600
|
||||
),
|
||||
*/
|
||||
*/
|
||||
'thumbnail' => array(
|
||||
// Uncomment the following to use a defined directory for the thumbnails
|
||||
// instead of a subdirectory based on the version identifier.
|
||||
@ -223,13 +223,13 @@ class UploadHandler
|
||||
protected function get_full_url() {
|
||||
$https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0 ||
|
||||
!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
|
||||
strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
|
||||
strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
|
||||
return
|
||||
($https ? 'https://' : 'http://').
|
||||
(!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : '').
|
||||
(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].
|
||||
($https && $_SERVER['SERVER_PORT'] === 443 ||
|
||||
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
|
||||
($https && $_SERVER['SERVER_PORT'] === 443 ||
|
||||
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
|
||||
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
|
||||
}
|
||||
|
||||
@ -377,7 +377,11 @@ class UploadHandler
|
||||
public function get_config_bytes($val) {
|
||||
$val = trim($val);
|
||||
$last = strtolower($val[strlen($val)-1]);
|
||||
$val = (int)$val;
|
||||
if (is_numeric($val)) {
|
||||
$val = (int)$val;
|
||||
} else {
|
||||
$val = (int)substr($val, 0, -1);
|
||||
}
|
||||
switch ($last) {
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
@ -414,7 +418,7 @@ class UploadHandler
|
||||
if ($this->options['max_file_size'] && (
|
||||
$file_size > $this->options['max_file_size'] ||
|
||||
$file->size > $this->options['max_file_size'])
|
||||
) {
|
||||
) {
|
||||
$file->error = $this->get_error_message('max_file_size');
|
||||
return false;
|
||||
}
|
||||
@ -424,9 +428,9 @@ class UploadHandler
|
||||
return false;
|
||||
}
|
||||
if (is_int($this->options['max_number_of_files']) &&
|
||||
($this->count_file_objects() >= $this->options['max_number_of_files']) &&
|
||||
// Ignore additional chunks of existing files:
|
||||
!is_file($this->get_upload_path($file->name))) {
|
||||
($this->count_file_objects() >= $this->options['max_number_of_files']) &&
|
||||
// Ignore additional chunks of existing files:
|
||||
!is_file($this->get_upload_path($file->name))) {
|
||||
$file->error = $this->get_error_message('max_number_of_files');
|
||||
return false;
|
||||
}
|
||||
@ -451,7 +455,7 @@ class UploadHandler
|
||||
unset($tmp);
|
||||
}
|
||||
}
|
||||
if (!empty($img_width)) {
|
||||
if (!empty($img_width) && !empty($img_height)) {
|
||||
if ($max_width && $img_width > $max_width) {
|
||||
$file->error = $this->get_error_message('max_width');
|
||||
return false;
|
||||
@ -488,7 +492,7 @@ class UploadHandler
|
||||
}
|
||||
|
||||
protected function get_unique_filename($file_path, $name, $size, $type, $error,
|
||||
$index, $content_range) {
|
||||
$index, $content_range) {
|
||||
while(is_dir($this->get_upload_path($name))) {
|
||||
$name = $this->upcount_name($name);
|
||||
}
|
||||
@ -505,10 +509,10 @@ class UploadHandler
|
||||
}
|
||||
|
||||
protected function fix_file_extension($file_path, $name, $size, $type, $error,
|
||||
$index, $content_range) {
|
||||
$index, $content_range) {
|
||||
// Add missing file extension for known image types:
|
||||
if (strpos($name, '.') === false &&
|
||||
preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
|
||||
preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) {
|
||||
$name .= '.'.$matches[1];
|
||||
}
|
||||
if ($this->options['correct_image_extensions']) {
|
||||
@ -538,7 +542,7 @@ class UploadHandler
|
||||
}
|
||||
|
||||
protected function trim_file_name($file_path, $name, $size, $type, $error,
|
||||
$index, $content_range) {
|
||||
$index, $content_range) {
|
||||
// Remove path information and dots around the filename, to prevent uploading
|
||||
// into different directories or replacing hidden system files.
|
||||
// Also remove control characters and spaces (\x00..\x20) around the filename:
|
||||
@ -561,7 +565,7 @@ class UploadHandler
|
||||
}
|
||||
|
||||
protected function get_file_name($file_path, $name, $size, $type, $error,
|
||||
$index, $content_range) {
|
||||
$index, $content_range) {
|
||||
$name = $this->trim_file_name($file_path, $name, $size, $type, $error,
|
||||
$index, $content_range);
|
||||
return $this->get_unique_filename(
|
||||
@ -795,25 +799,26 @@ class UploadHandler
|
||||
// Handle transparency in GIF and PNG images:
|
||||
switch ($type) {
|
||||
case 'gif':
|
||||
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
|
||||
break;
|
||||
case 'png':
|
||||
imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0));
|
||||
case 'png':
|
||||
imagealphablending($new_img, false);
|
||||
imagesavealpha($new_img, true);
|
||||
break;
|
||||
}
|
||||
$success = imagecopyresampled(
|
||||
$new_img,
|
||||
$src_img,
|
||||
$dst_x,
|
||||
$dst_y,
|
||||
0,
|
||||
0,
|
||||
$new_width,
|
||||
$new_height,
|
||||
$img_width,
|
||||
$img_height
|
||||
) && $write_func($new_img, $new_file_path, $image_quality);
|
||||
$new_img,
|
||||
$src_img,
|
||||
$dst_x,
|
||||
$dst_y,
|
||||
0,
|
||||
0,
|
||||
$new_width,
|
||||
$new_height,
|
||||
$img_width,
|
||||
$img_height
|
||||
) && $write_func($new_img, $new_file_path, $image_quality);
|
||||
$this->gd_set_image_object($file_path, $new_img);
|
||||
return $success;
|
||||
}
|
||||
@ -827,7 +832,12 @@ class UploadHandler
|
||||
$image->setResourceLimit($type, $limit);
|
||||
}
|
||||
}
|
||||
$image->readImage($file_path);
|
||||
try {
|
||||
$image->readImage($file_path);
|
||||
} catch (ImagickException $e) {
|
||||
error_log($e->getMessage());
|
||||
return null;
|
||||
}
|
||||
$this->image_objects[$file_path] = $image;
|
||||
}
|
||||
return $this->image_objects[$file_path];
|
||||
@ -884,6 +894,7 @@ class UploadHandler
|
||||
$file_path,
|
||||
!empty($options['crop']) || !empty($options['no_cache'])
|
||||
);
|
||||
if (is_null($image)) return false;
|
||||
if ($image->getImageFormat() === 'GIF') {
|
||||
// Handle animated GIFs:
|
||||
$images = $image->coalesceImages();
|
||||
@ -896,32 +907,28 @@ class UploadHandler
|
||||
$image_oriented = false;
|
||||
if (!empty($options['auto_orient'])) {
|
||||
$image_oriented = $this->imagick_orient_image($image);
|
||||
}
|
||||
|
||||
$image_resize = false;
|
||||
}
|
||||
$image_resize = false;
|
||||
$new_width = $max_width = $img_width = $image->getImageWidth();
|
||||
$new_height = $max_height = $img_height = $image->getImageHeight();
|
||||
|
||||
$new_height = $max_height = $img_height = $image->getImageHeight();
|
||||
// use isset(). User might be setting max_width = 0 (auto in regular resizing). Value 0 would be considered empty when you use empty()
|
||||
if (isset($options['max_width'])) {
|
||||
$image_resize = true;
|
||||
$new_width = $max_width = $options['max_width'];
|
||||
$image_resize = true;
|
||||
$new_width = $max_width = $options['max_width'];
|
||||
}
|
||||
if (isset($options['max_height'])) {
|
||||
$image_resize = true;
|
||||
$new_height = $max_height = $options['max_height'];
|
||||
}
|
||||
|
||||
$image_strip = (isset($options['strip']) ? $options['strip'] : false);
|
||||
|
||||
if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) {
|
||||
if ( !$image_oriented && ($max_width >= $img_width) && ($max_height >= $img_height) && !$image_strip && empty($options["jpeg_quality"]) ) {
|
||||
if ($file_path !== $new_file_path) {
|
||||
return copy($file_path, $new_file_path);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
$crop = (isset($options['crop']) ? $options['crop'] : false);
|
||||
|
||||
|
||||
if ($crop) {
|
||||
$x = 0;
|
||||
$y = 0;
|
||||
@ -1111,14 +1118,14 @@ class UploadHandler
|
||||
}
|
||||
if (count($failed_versions)) {
|
||||
$file->error = $this->get_error_message('image_resize')
|
||||
.' ('.implode($failed_versions, ', ').')';
|
||||
.' ('.implode($failed_versions, ', ').')';
|
||||
}
|
||||
// Free memory:
|
||||
$this->destroy_image_object($file_path);
|
||||
}
|
||||
|
||||
protected function handle_file_upload($uploaded_file, $name, $size, $type, $error,
|
||||
$index = null, $content_range = null) {
|
||||
$index = null, $content_range = null) {
|
||||
$file = new \stdClass();
|
||||
$file->name = $this->get_file_name($uploaded_file, $name, $size, $type, $error,
|
||||
$index, $content_range);
|
||||
@ -1319,8 +1326,7 @@ class UploadHandler
|
||||
$json = json_encode($content);
|
||||
$redirect = stripslashes($this->get_post_param('redirect'));
|
||||
if ($redirect && preg_match($this->options['redirect_allow_target'], $redirect)) {
|
||||
$this->header('Location: '.sprintf($redirect, rawurlencode($json)));
|
||||
return;
|
||||
return $this->header('Location: '.sprintf($redirect, rawurlencode($json)));
|
||||
}
|
||||
$this->head();
|
||||
if ($this->get_server_var('HTTP_CONTENT_RANGE')) {
|
||||
@ -1411,11 +1417,11 @@ class UploadHandler
|
||||
$files[] = $this->handle_file_upload(
|
||||
isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
|
||||
$file_name ? $file_name : (isset($upload['name']) ?
|
||||
$upload['name'] : null),
|
||||
$upload['name'] : null),
|
||||
$size ? $size : (isset($upload['size']) ?
|
||||
$upload['size'] : $this->get_server_var('CONTENT_LENGTH')),
|
||||
$upload['size'] : $this->get_server_var('CONTENT_LENGTH')),
|
||||
isset($upload['type']) ?
|
||||
$upload['type'] : $this->get_server_var('CONTENT_TYPE'),
|
||||
$upload['type'] : $this->get_server_var('CONTENT_TYPE'),
|
||||
isset($upload['error']) ? $upload['error'] : null,
|
||||
null,
|
||||
$content_range
|
||||
|
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
@ -1431,7 +1431,6 @@ return array(
|
||||
'Zotlabs\\Widget\\Wiki_pages' => $baseDir . '/Zotlabs/Widget/Wiki_pages.php',
|
||||
'Zotlabs\\Widget\\Zcard' => $baseDir . '/Zotlabs/Widget/Zcard.php',
|
||||
'Zotlabs\\Zot6\\Finger' => $baseDir . '/Zotlabs/Zot6/Finger.php',
|
||||
'Zotlabs\\Zot6\\HTTPSig' => $baseDir . '/Zotlabs/Zot6/HTTPSig.php',
|
||||
'Zotlabs\\Zot6\\IHandler' => $baseDir . '/Zotlabs/Zot6/IHandler.php',
|
||||
'Zotlabs\\Zot6\\Receiver' => $baseDir . '/Zotlabs/Zot6/Receiver.php',
|
||||
'Zotlabs\\Zot6\\Zot6Handler' => $baseDir . '/Zotlabs/Zot6/Zot6Handler.php',
|
||||
|
1
vendor/composer/autoload_static.php
vendored
1
vendor/composer/autoload_static.php
vendored
@ -1599,7 +1599,6 @@ class ComposerStaticInit7b34d7e50a62201ec5d5e526a5b8b35d
|
||||
'Zotlabs\\Widget\\Wiki_pages' => __DIR__ . '/../..' . '/Zotlabs/Widget/Wiki_pages.php',
|
||||
'Zotlabs\\Widget\\Zcard' => __DIR__ . '/../..' . '/Zotlabs/Widget/Zcard.php',
|
||||
'Zotlabs\\Zot6\\Finger' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Finger.php',
|
||||
'Zotlabs\\Zot6\\HTTPSig' => __DIR__ . '/../..' . '/Zotlabs/Zot6/HTTPSig.php',
|
||||
'Zotlabs\\Zot6\\IHandler' => __DIR__ . '/../..' . '/Zotlabs/Zot6/IHandler.php',
|
||||
'Zotlabs\\Zot6\\Receiver' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Receiver.php',
|
||||
'Zotlabs\\Zot6\\Zot6Handler' => __DIR__ . '/../..' . '/Zotlabs/Zot6/Zot6Handler.php',
|
||||
|
26
vendor/composer/installed.json
vendored
26
vendor/composer/installed.json
vendored
@ -1,20 +1,20 @@
|
||||
[
|
||||
{
|
||||
"name": "blueimp/jquery-file-upload",
|
||||
"version": "v9.30.0",
|
||||
"version_normalized": "9.30.0.0",
|
||||
"version": "v9.31.0",
|
||||
"version_normalized": "9.31.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vkhramtsov/jQuery-File-Upload.git",
|
||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558"
|
||||
"reference": "2485bf016e1085f0cd8308723064458cb0af5729"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
||||
"reference": "1fceec556879403e5c1ae32a7c448aa12b8c3558",
|
||||
"url": "https://api.github.com/repos/vkhramtsov/jQuery-File-Upload/zipball/2485bf016e1085f0cd8308723064458cb0af5729",
|
||||
"reference": "2485bf016e1085f0cd8308723064458cb0af5729",
|
||||
"shasum": ""
|
||||
},
|
||||
"time": "2019-04-22T09:21:57+00:00",
|
||||
"time": "2019-05-24T07:59:46+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -984,17 +984,17 @@
|
||||
},
|
||||
{
|
||||
"name": "sabre/xml",
|
||||
"version": "1.5.0",
|
||||
"version_normalized": "1.5.0.0",
|
||||
"version": "1.5.1",
|
||||
"version_normalized": "1.5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sabre-io/xml.git",
|
||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7"
|
||||
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7",
|
||||
"reference": "59b20e5bbace9912607481634f97d05a776ffca7",
|
||||
"url": "https://api.github.com/repos/sabre-io/xml/zipball/a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||
"reference": "a367665f1df614c3b8fefc30a54de7cd295e444e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1006,10 +1006,10 @@
|
||||
"sabre/uri": ">=1.0,<3.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*",
|
||||
"phpunit/phpunit": "~4.8|~5.7",
|
||||
"sabre/cs": "~1.0.0"
|
||||
},
|
||||
"time": "2016-10-09T22:57:52+00:00",
|
||||
"time": "2019-01-09T13:51:57+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
6
vendor/sabre/xml/CHANGELOG.md
vendored
6
vendor/sabre/xml/CHANGELOG.md
vendored
@ -1,6 +1,12 @@
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
1.5.1 (2019-01-09)
|
||||
------------------
|
||||
|
||||
* #161: Prevent infinite loop on empty xml elements
|
||||
|
||||
|
||||
1.5.0 (2016-10-09)
|
||||
------------------
|
||||
|
||||
|
2
vendor/sabre/xml/composer.json
vendored
2
vendor/sabre/xml/composer.json
vendored
@ -45,7 +45,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"sabre/cs": "~1.0.0",
|
||||
"phpunit/phpunit" : "*"
|
||||
"phpunit/phpunit" : "~4.8|~5.7"
|
||||
},
|
||||
"config" : {
|
||||
"bin-dir" : "bin/"
|
||||
|
33
vendor/sabre/xml/lib/Deserializer/functions.php
vendored
33
vendor/sabre/xml/lib/Deserializer/functions.php
vendored
@ -66,9 +66,20 @@ function keyValue(Reader $reader, $namespace = null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!$reader->read()) {
|
||||
$reader->next();
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
if (Reader::END_ELEMENT === $reader->nodeType) {
|
||||
$reader->next();
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
$values = [];
|
||||
|
||||
$reader->read();
|
||||
do {
|
||||
|
||||
if ($reader->nodeType === Reader::ELEMENT) {
|
||||
@ -79,7 +90,9 @@ function keyValue(Reader $reader, $namespace = null) {
|
||||
$values[$clark] = $reader->parseCurrentElement()['value'];
|
||||
}
|
||||
} else {
|
||||
$reader->read();
|
||||
if (!$reader->read()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while ($reader->nodeType !== Reader::END_ELEMENT);
|
||||
|
||||
@ -144,7 +157,17 @@ function enum(Reader $reader, $namespace = null) {
|
||||
$reader->next();
|
||||
return [];
|
||||
}
|
||||
$reader->read();
|
||||
if (!$reader->read()) {
|
||||
$reader->next();
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
if (Reader::END_ELEMENT === $reader->nodeType) {
|
||||
$reader->next();
|
||||
|
||||
return [];
|
||||
}
|
||||
$currentDepth = $reader->depth;
|
||||
|
||||
$values = [];
|
||||
@ -204,7 +227,9 @@ function valueObject(Reader $reader, $className, $namespace) {
|
||||
$reader->next();
|
||||
}
|
||||
} else {
|
||||
$reader->read();
|
||||
if (!$reader->read()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while ($reader->nodeType !== Reader::END_ELEMENT);
|
||||
|
||||
|
3
vendor/sabre/xml/lib/Service.php
vendored
3
vendor/sabre/xml/lib/Service.php
vendored
@ -138,7 +138,8 @@ class Service {
|
||||
* @param string|string[] $rootElementName
|
||||
* @param string|resource $input
|
||||
* @param string|null $contextUri
|
||||
* @return void
|
||||
* @throws ParseException
|
||||
* @return array|object|string
|
||||
*/
|
||||
function expect($rootElementName, $input, $contextUri = null) {
|
||||
|
||||
|
@ -33,5 +33,6 @@ main.fullscreen .fc td:last-child {
|
||||
.bootstrap-tagsinput {
|
||||
width: 100%;
|
||||
padding: 6px 12px;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
|
26214
view/de-de/hmessages.po
26214
view/de-de/hmessages.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1077,17 +1077,9 @@ function justifyPhotos(id) {
|
||||
justifiedGalleryActive = true;
|
||||
$('#' + id).show();
|
||||
$('#' + id).justifiedGallery({
|
||||
selector: 'a, div:not(.spinner, #page-end)',
|
||||
selector: 'a, div:not(#page-end)',
|
||||
margins: 3,
|
||||
border: 0,
|
||||
sizeRangeSuffixes: {
|
||||
'lt100': '-3',
|
||||
'lt240': '-3',
|
||||
'lt320': '-3',
|
||||
'lt500': '-2',
|
||||
'lt640': '-2',
|
||||
'lt1024': '-1'
|
||||
}
|
||||
border: 0
|
||||
}).on('jg.complete', function(e){ justifiedGalleryActive = false; });
|
||||
}
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
[region=aside]
|
||||
[widget=eventstools][/widget]
|
||||
[widget=tasklist][/widget]
|
||||
[/region]
|
||||
[region=right_aside]
|
||||
[widget=notifications][/widget]
|
||||
[widget=newmember][/widget]
|
||||
[/region]
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user