]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #987 from ArthurHoaro/hotfix/security-issue
authorArthurHoaro <arthur@hoa.ro>
Sat, 7 Oct 2017 09:33:20 +0000 (11:33 +0200)
committerGitHub <noreply@github.com>
Sat, 7 Oct 2017 09:33:20 +0000 (11:33 +0200)
Fix security issue reported by @chb9

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

index c2552ce8662ef48034c8f3c3f7bfd56039489a1d..4068a828f10293ee40a8e245e5052e908cbe8bf3 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}"