SF.net SVN: phpwiki:[10744] trunk/lib/plugin/PhotoAlbum.php

vargenau--- via phpwiki-checkins <[email protected]>
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 10744
          http://sourceforge.net/p/phpwiki/code/10744
Author:   vargenau
Date:     2021-12-07 14:02:01 +0000 (Tue, 07 Dec 2021)
Log Message:
-----------
PhotoAlbum plugin: no / in front of URL

Modified Paths:
--------------
    trunk/lib/plugin/PhotoAlbum.php

Modified: trunk/lib/plugin/PhotoAlbum.php
===================================================================
--- trunk/lib/plugin/PhotoAlbum.php	2021-12-07 08:17:20 UTC (rev 10743)
+++ trunk/lib/plugin/PhotoAlbum.php	2021-12-07 14:02:01 UTC (rev 10744)
@@ -632,12 +632,17 @@
 
     private function image_tile($params)
     {
+        if (IsSafeURL($params['src'], true)) {
+            $src = $params['src'];
+        } else {
+            $src = '/'.$params['src'];
+        }
         if (array_key_exists('width', $params)) {
-            return HTML::img(array('src' => '/'.$params['src'],
+            return HTML::img(array('src' => $src,
                                    'width' => $params['width'],
                                    'alt' => $params['alt']));
         } else {
-            return HTML::img(array('src' => '/'.$params['src'],
+            return HTML::img(array('src' => $src,
                                    'alt' => $params['alt']));
         }
     }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.