]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/stream.php
CSRF protection in user registration
[quix0rs-gnu-social.git] / lib / stream.php
index 64dbcbce3665da592b6a555e98a6de3a40d3821c..fbdba91c9771280937f7b2417433874d92e26b70 100644 (file)
@@ -96,6 +96,10 @@ class StreamAction extends Action {
                }
                common_element_end('p');
                $noticeurl = common_local_url('shownotice', array('notice' => $notice->id));
+               # XXX: we need to figure this out better. Is this right?
+               if (strcmp($notice->uri, $noticeurl) != 0 && preg_match('/^http/', $notice->uri)) {
+                       $noticeurl = $notice->uri;
+               }
                common_element_start('p', 'time');
                common_element('a', array('class' => 'permalink',
                                                                  'href' => $noticeurl,