From 5cfc2869724effc02fc5b1767e4488750c82b2dd Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 21 Jul 2016 20:04:30 -0700 Subject: zat URL auth updated to match changes to the atoken_login interface --- include/auth.php | 12 ++++++++++-- include/channel.php | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/auth.php b/include/auth.php index f8120981a..f3592cee3 100644 --- a/include/auth.php +++ b/include/auth.php @@ -16,16 +16,24 @@ require_once('include/security.php'); /** * @brief Verify login credentials. * - * If system authlog is set a log entry will be added for failed login + * If system.authlog is set a log entry will be added for failed login * attempts. * - * @param string $email + * @param string $login * The login to verify (channel address, account email or guest login token). * @param string $pass * The provided password to verify. * @return array|null * Returns account record on success, null on failure. + * The return array is dependent on the login mechanism. + * $ret['account'] will be set if either an email or channel address validation was successful (local login). + * $ret['channel'] will be set if a channel address validation was successful. + * $ret['xchan'] will be set if a guest access token validation was successful. + * Keys will exist for invalid return arrays but will be set to null. + * This function does not perform a login. It merely validates systems passwords and tokens. + * */ + function account_verify_password($login, $pass) { $ret = [ 'account' => null, 'channel' => null, 'xchan' => null ]; diff --git a/include/channel.php b/include/channel.php index 1a6508803..8e0747f25 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1356,7 +1356,8 @@ function zat_init() { dbesc($_REQUEST['zat']) ); if($r) { - atoken_login($r[0]); + $xchan = atoken_xchan($r[0]); + atoken_login($xchan); } } -- cgit v1.2.3 From 79eeeaee95e66f8a96d47067ac4386884f0121d6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 21 Jul 2016 21:35:26 -0700 Subject: fix birthday addtocal --- include/datetime.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/datetime.php b/include/datetime.php index 600ad6ec4..76bd6b8d6 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -556,13 +556,13 @@ function update_birthdays() { $ev['uid'] = $rr['abook_channel']; $ev['account'] = $rr['abook_account']; $ev['event_xchan'] = $rr['xchan_hash']; - $ev['start'] = datetime_convert('UTC', 'UTC', $rr['abook_dob']); - $ev['finish'] = datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day '); + $ev['dtstart'] = datetime_convert('UTC', 'UTC', $rr['abook_dob']); + $ev['dtend'] = datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day '); $ev['adjust'] = intval(feature_enabled($rr['abook_channel'],'smart_birthdays')); $ev['summary'] = sprintf( t('%1$s\'s birthday'), $rr['xchan_name']); $ev['description'] = sprintf( t('Happy Birthday %1$s'), '[zrl=' . $rr['xchan_url'] . ']' . $rr['xchan_name'] . '[/zrl]') ; - $ev['type'] = 'birthday'; + $ev['etype'] = 'birthday'; $z = event_store_event($ev); if ($z) { -- cgit v1.2.3 From 24d28bc23a5dcc0dce7765463d94cc68e599efae Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 25 Jul 2016 13:29:06 -0700 Subject: issue #460 --- include/api_auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/api_auth.php b/include/api_auth.php index 7a71bad73..89882f821 100644 --- a/include/api_auth.php +++ b/include/api_auth.php @@ -65,7 +65,7 @@ function api_login(&$a){ } if($record['account']) { - authenticate_success($record); + authenticate_success($record['account']); if($channel_login) change_channel($channel_login); -- cgit v1.2.3 From 54ecf0f45f4f8d67a34025b78d025b154eea3fba Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 26 Jul 2016 09:04:52 +0200 Subject: URLUtil path has changed since sabredav 1.8 - fixes renaming issue in dav clients --- Zotlabs/Storage/Directory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index 6242d5274..0860f99a1 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -3,6 +3,7 @@ namespace Zotlabs\Storage; use Sabre\DAV; +use Sabre\HTTP; /** * @brief RedDirectory class. @@ -159,7 +160,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota { throw new DAV\Exception\Forbidden('Permission denied.'); } - list($parent_path, ) = DAV\URLUtil::splitPath($this->red_path); + list($parent_path, ) = HTTP\URLUtil::splitPath($this->red_path); $new_path = $parent_path . '/' . $name; $r = q("UPDATE attach SET filename = '%s' WHERE hash = '%s' AND uid = %d", -- cgit v1.2.3