]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #691 from ArthurHoaro/plugins/no-md-feed
authorArthur <arthur@hoa.ro>
Thu, 1 Dec 2016 10:13:04 +0000 (11:13 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Dec 2016 10:13:04 +0000 (11:13 +0100)
Markdown: fixes feed rendering with nomarkdown tag

18 files changed:
CHANGELOG.md
application/.htaccess
cache/.htaccess
data/.htaccess
docker/.htaccess
docker/development/Dockerfile
docker/development/nginx.conf
docker/production/Dockerfile
docker/production/nginx.conf
docker/production/stable/Dockerfile
docker/production/stable/nginx.conf
index.php
pagecache/.htaccess
tests/.htaccess
tmp/.htaccess
tpl/editlink.html
tpl/includes.html
tpl/tools.html

index d42d6a75e2fa42c02d9be9e27b763079a8795a94..5eeb521af36466c06b60c67d6b9cccd074540f36 100644 (file)
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
     - archives contain a `Shaarli` directory, itself containing sources + dependencies
     - the tarball is now gzipped
 - Minor code cleanup: PHPDoc, spelling, unused variables, etc.
+- Docker: explicitly set the maximum file upload size to 10 MiB
 
 ### Fixed
 - Fix the server `<self>` value in Atom/RSS feeds
@@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
     - Tools: only display parameter description when it exists
     - archive.org: do not propose archival of private notes
 - Use absolute URL for hashtags in RSS and ATOM feeds
+- Docker: specify the location of the favicon
 
 ### Security
 - Allow whitelisting trusted IPs, else continue banning clients upon login failure
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index 0c19b0855d0b9d282e04e906cce7d254bab2af3f..d9ef8da7db2eada974c7d6ce6cd6f684583755f6 100644 (file)
@@ -15,6 +15,8 @@ RUN apt-get update \
        nano \
     && apt-get clean
 
+RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
+RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
 COPY nginx.conf /etc/nginx/nginx.conf
 COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
 
index cda09b565028b0ad39400b3d715d03789e989250..ac0c6c61ce165976b7572bb96eb8ba90b5f4d2a8 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -49,6 +51,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index d93ed262b79acd97ce114256aa940a927bf794a4..d0509115c5907e158c52292919b7a87506ae070e 100644 (file)
@@ -14,6 +14,8 @@ RUN apt-get update \
        supervisor \
     && apt-get clean
 
+RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
+RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
 COPY nginx.conf /etc/nginx/nginx.conf
 COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
 
index e23c4587da122c790f26c6893838280c39b03908..5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -41,6 +43,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index a509fda65cfc00fee884127fda3e2433f6adfe9b..fc9588b0d604dd4023a232ef17c4a8d76f26d98b 100644 (file)
@@ -14,6 +14,8 @@ RUN apt-get update \
        supervisor \
     && apt-get clean
 
+RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
+RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
 COPY nginx.conf /etc/nginx/nginx.conf
 COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
 
index e23c4587da122c790f26c6893838280c39b03908..5ffa02d0a9d570136d4ab7ea8f8bef4107f03cb7 100644 (file)
@@ -11,6 +11,8 @@ http {
     default_type       application/octet-stream;
     keepalive_timeout  20;
 
+    client_max_body_size 10m;
+
     index index.html index.php;
 
     server {
@@ -41,6 +43,11 @@ http {
             add_header Cache-Control "public, must-revalidate, proxy-revalidate";
         }
 
+        location = /favicon.ico {
+            # serve the Shaarli favicon from its custom location
+            alias /var/www/shaarli/images/favicon.ico;
+        }
+
         location ~ (index)\.php$ {
             # filter and proxy PHP requests to PHP-FPM
             fastcgi_pass   unix:/var/run/php5-fpm.sock;
index 84282b8dc6c6ecc41dd67cae0eae0e9c3fdf883a..5366cb0e22fbdafe221e0b0a2c1910b67f5122f0 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1078,6 +1078,7 @@ function renderPage($conf, $pluginManager)
     {
         $data = array(
             'pageabsaddr' => index_url($_SERVER),
+            'sslenabled' => !empty($_SERVER['HTTPS'])
         );
         $pluginManager->executeHooks('render_tools', $data);
 
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index b584d98c56a27ebb09c963313876fd8d1a3e9987..f601c1eeee5ff6e42f4eccdd43f76169fdf0ba0a 100644 (file)
@@ -1,2 +1,13 @@
-Allow from none
-Deny from all
+<IfModule version_module>
+  <IfVersion >= 2.4>
+     Require all denied
+  </IfVersion>
+  <IfVersion < 2.4>
+     Allow from none
+     Deny from all
+  </IfVersion>
+</IfModule>
+
+<IfModule !version_module>
+    Require all denied
+</IfModule>
index 441b530271fb0e5e6dcceaa5b674a6ea47de5125..9e7621dbea26b7452a167974b25fc1ca16d48a52 100644 (file)
@@ -8,13 +8,15 @@
 {elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
 {else}onload="document.linkform.lf_tags.focus();"{/if} >
 <div id="pageheader">
-       {if="$source !== 'firefoxsocialapi'"}
-       {include="page.header"}
-       {/if}
-       <div id="editlinkform">
-           <form method="post" name="linkform">
-               <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
-               <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input"><br>
+    {if="$source !== 'firefoxsocialapi'"}
+    {include="page.header"}
+    {else}
+    <div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
+    {/if}
+    <div id="editlinkform">
+        <form method="post" name="linkform">
+            <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
+            <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input"><br>
             <label for="lf_title"><i>Title</i></label><br><input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input"><br>
             <label for="lf_description"><i>Description</i></label><br><textarea name="lf_description" id="lf_description" rows="4" cols="25">{$link.description}</textarea><br>
             <label for="lf_tags"><i>Tags</i></label><br>
                 {$value}
             {/loop}
 
-               {if="($link_is_new && $default_private_links) || $link.private == true"}
+            {if="($link_is_new && $default_private_links) || $link.private == true"}
             <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
             &nbsp;<label for="lf_private"><i>Private</i></label><br>
             {else}
             <input type="checkbox"  name="lf_private" id="lf_private">
             &nbsp;<label for="lf_private"><i>Private</i></label><br>
             {/if}
-               <input type="submit" value="Save" name="save_edit" class="bigbutton">
-               <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
-               {if="!$link_is_new"}<input type="submit" value="Delete" name="delete_link" class="bigbutton delete" onClick="return confirmDeleteLink();">{/if}
-               <input type="hidden" name="token" value="{$token}">
-               {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
-           </form>
-       </div>
+            <input type="submit" value="Save" name="save_edit" class="bigbutton">
+            <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
+            {if="!$link_is_new"}<input type="submit" value="Delete" name="delete_link" class="bigbutton delete" onClick="return confirmDeleteLink();">{/if}
+            <input type="hidden" name="token" value="{$token}">
+            {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer}">{/if}
+        </form>
+    </div>
 </div>
 {if="$source !== 'firefoxsocialapi'"}
 {include="page.footer"}
index f94ce1be97ea55632c5df8fb79775f40f6d1f87f..7b2997ce45e73b8dd8ce7df72dd3ba93a08d3864 100644 (file)
@@ -2,6 +2,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="format-detection" content="telephone=no" />
 <meta name="viewport" content="width=device-width,initial-scale=1.0" />
+<meta name="referrer" content="same-origin">
 <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
 <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
 <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
@@ -11,4 +12,4 @@
 {loop="$plugins_includes.css_files"}
 <link type="text/css" rel="stylesheet" href="{$value}#"/>
 {/loop}
-<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}"/>
\ No newline at end of file
+<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}"/>
index 8e285f445733cf5c28ded6387e1bc541521243e4..e06d239d4fe07f8beb6d2e140dde7031abee2cfc 100644 (file)
                                &nbsp;&nbsp;&nbsp;&nbsp;Then click "✚Add Note" button anytime to start composing a private Note (text post) to your Shaarli.
                        </span>
                </a><br><br>
+
+               {if="$sslenabled"}
                <a class="smallbutton" onclick="activateFirefoxSocial(this)">
                        <b>✚Add to Firefox social</b>
                </a>
                <a href="#">
                        <span>&#x21D0; Click on this button to add Shaarli to the "Share this page" button in Firefox.</span>
                </a><br><br>
+               {/if}
 
                {loop="$tools_plugin"}
             {$value}
@@ -64,6 +67,7 @@
                <div class="clear"></div>
 
                <script>
+                       {if="$sslenabled"}
                        function activateFirefoxSocial(node) {
                                var loc = location.href;
                                var baseURL = loc.substring(0, loc.lastIndexOf("/"));
@@ -87,7 +91,7 @@
                                var activate = new CustomEvent("ActivateSocialFeature");
                                node.dispatchEvent(activate);
                        }
-
+                       {/if}
                        function alertBookmarklet() {
                                alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');
                                return false;