- 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
- 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
-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>
-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>
-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>
-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>
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
default_type application/octet-stream;
keepalive_timeout 20;
+ client_max_body_size 10m;
+
index index.html index.php;
server {
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;
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
default_type application/octet-stream;
keepalive_timeout 20;
+ client_max_body_size 10m;
+
index index.html index.php;
server {
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;
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
default_type application/octet-stream;
keepalive_timeout 20;
+ client_max_body_size 10m;
+
index index.html index.php;
server {
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;
{
$data = array(
'pageabsaddr' => index_url($_SERVER),
+ 'sslenabled' => !empty($_SERVER['HTTPS'])
);
$pluginManager->executeHooks('render_tools', $data);
-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>
-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>
-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>
{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">
<label for="lf_private"><i>Private</i></label><br>
{else}
<input type="checkbox" name="lf_private" id="lf_private">
<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"}
<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" />
{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}"/>
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>⇐ Click on this button to add Shaarli to the "Share this page" button in Firefox.</span>
</a><br><br>
+ {/if}
{loop="$tools_plugin"}
{$value}
<div class="clear"></div>
<script>
+ {if="$sslenabled"}
function activateFirefoxSocial(node) {
var loc = location.href;
var baseURL = loc.substring(0, loc.lastIndexOf("/"));
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;