diff options
author | Brion Vibber <brion@status.net> | 2010-08-12 15:19:47 -0700 |
---|---|---|
committer | Brion Vibber <brion@status.net> | 2010-08-12 15:25:32 -0700 |
commit | f7d599f8eac0a9e3d47c3ff2f074bed0b6e9c124 (patch) | |
tree | 86d74feefe36d91f52d5ba9548de972acf605049 /lib | |
parent | 78eea352b4ad142e58b598c50929d5a4edb991fc (diff) |
Fix for ticket 2513: "Can't linkify" error when some links are shortened
When bogus SSL sites etc were hit through a shortening redirect, sometimes link resolution kinda blew up and the user would get a "Can't linkify" error, aborting their post.
Now catching this case and just passing through the URL without attempting to resolve it. Could benefit from an overall scrubbing of the freaky link/attachment code though...! :)
http://status.net/open-source/issues/2513
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php index 9f62097d5..66600c766 100644 --- a/lib/util.php +++ b/lib/util.php @@ -830,7 +830,10 @@ function common_linkify($url) { } elseif (is_string($longurl_data)) { $longurl = $longurl_data; } else { - throw new ServerException("Can't linkify url '$url'"); + // Unable to reach the server to verify contents, etc + // Just pass the link on through for now. + common_log(LOG_ERR, "Can't linkify url '$url'"); + $longurl = $url; } } $attrs = array('href' => $canon, 'title' => $longurl, 'rel' => 'external'); |