diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/Connect.php | 8 | ||||
-rw-r--r-- | Zotlabs/Module/Magic.php | 9 |
3 files changed, 18 insertions, 1 deletions
@@ -1,4 +1,6 @@ Hubzilla 10.2 (2025-??-??) + - Print an error message if OWA fails + - Remove possible leading @ before processing webfinger address - Updated debian install script - Calculate observer.baseurl from xchan_url instead of xchan_connurl - Refactor unparse_url() to allow return of a custom field set only and add tests diff --git a/Zotlabs/Lib/Connect.php b/Zotlabs/Lib/Connect.php index b8e7a5c4e..a68f73e6c 100644 --- a/Zotlabs/Lib/Connect.php +++ b/Zotlabs/Lib/Connect.php @@ -24,10 +24,16 @@ class Connect { $uid = $channel['channel_id']; - if (strpos($url,'@') === false && strpos($url,'/') === false) { + // If we get just a channel name and it is not an URL turn it into a local webbie + if (!str_contains($url, '@') && strpos($url,'/') === false) { $url = $url . '@' . App::get_hostname(); } + // Remove a possible leading @ + if (!str_starts_with($url, '@')) { + $url = ltrim($url, '@'); + } + $result = [ 'success' => false, 'message' => '' ]; $my_perms = false; diff --git a/Zotlabs/Module/Magic.php b/Zotlabs/Module/Magic.php index e722a7161..732488002 100644 --- a/Zotlabs/Module/Magic.php +++ b/Zotlabs/Module/Magic.php @@ -134,6 +134,15 @@ class Magic extends Controller { $args = (($x) ? '&owt=' . $token : '?owt=' . $token) . (($delegate) ? '&delegate=1' : ''); goaway($dest . $args); } + else { + $o = '<h1>OWA ERROR</h1>'; + if (!empty($j['message'])) { + $o .= '<h2>' . $j['message'] . '</h2>'; + } + $o .= '<a href=' . $dest . '>' . $dest . '</a>'; + + echo $o; + } } } } |