]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Fix security issue reported by @chbi 987/head
authorArthurHoaro <arthur@hoa.ro>
Sat, 7 Oct 2017 09:27:44 +0000 (11:27 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sat, 7 Oct 2017 09:27:44 +0000 (11:27 +0200)
Vulnerability introduced by 6ccd0b218fbd34de750f55b78f3dc43bb3d9fa8e - release with Shaarli v0.9.1.

index.php
tpl/default/tag.cloud.html

index fb00a9fa3adb8d302f712fcbe7d7fc2a694409f4..8f0179e5e3984e0251488b0fc08cc898a1f33053 100644 (file)
--- a/index.php
+++ b/index.php
@@ -840,7 +840,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
         }
 
         $data = array(
-            'search_tags' => implode(' ', $filteringTags),
+            'search_tags' => implode(' ', escape($filteringTags)),
             'tags' => $tagList,
         );
         $pluginManager->executeHooks('render_tagcloud', $data, array('loggedin' => isLoggedIn()));
@@ -870,7 +870,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
         }
 
         $data = [
-            'search_tags' => implode(' ', $filteringTags),
+            'search_tags' => implode(' ', escape($filteringTags)),
             'tags' => $tags,
         ];
         $pluginManager->executeHooks('render_taglist', $data, ['loggedin' => isLoggedIn()]);
index 96b357a3e1ec282885c4314388a0a67adb4131a5..68335c709ba90b5be6b79e80e2cabd9c03b05b9f 100644 (file)
@@ -26,7 +26,7 @@
           <input type="hidden" name="do" value="tagcloud">
           <input type="text" name="searchtags" placeholder="{'Filter by tag'|t}"
                  {if="!empty($search_tags)"}
-                 value="{$search_tags}"
+                    value="{$search_tags}"
                  {/if}
           autocomplete="off" data-multiple data-autofirst data-minChars="1"
           data-list="{loop="$tags"}{$key}, {/loop}"