Commit Graph

14 Commits

Author SHA1 Message Date
Knah Tsaeb adc4aee80f Change templates set through administration UI 2017-01-05 12:04:02 +01:00
ArthurHoaro ba0fd80732 Improve theme dependent plugin placeholders:
- buttons_toolbar: now expect links represented by an array instead of HTML content
  - fields_toolbar: now expect a form represented by an array instead of HTML content
  - action_plugin: now expect links represented by an array instead of HTML content

Default templates updated accordingly
mprove theme dependent plugin placeholders:
2016-12-01 11:38:21 +01:00
VirtualTam dec5fe9c69 Cleanup: explicitely loop over PHP variables in templates
Relates to https://github.com/shaarli/Shaarli/issues/613

Before: {loop="someVariable"}
After:  {loop="$someVariable"}

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2016-10-16 17:41:08 +02:00
ArthurHoaro 684e662a58 Replace $GLOBALS configuration with the configuration manager in the whole code base 2016-06-11 09:30:56 +02:00
ArthurHoaro 141a86c503 Add private link counter 2016-05-13 08:48:23 +02:00
ArthurHoaro 056107ab4e Handle errors raised by plugins in template. fixes #370 2015-11-08 13:22:44 +01:00
ArthurHoaro 567967fdf9 Template upgrade to handle plugin zones
Add a bunch of plugin placeholders in templates
2015-11-07 15:27:22 +01:00
ArthurHoaro 5f85fcd863 Working on shaarli/Shaarli#224
I reviewed character escaping everywhere with the following ideas:

  * use a single common function to escape user data: `escape` using `htmlspecialchars`.
  * sanitize fields in `index.php` after reading them from datastore and before sending them to templates.
  	It means no escaping function in Twig templates.
    2 reasons:
    * it reduces risks of security issue for future user made templates
    * more readable templates
  * sanitize user configuration fields after loading them.
2015-06-23 16:35:36 +02:00
Miloš Jovanović 4aca798e47 added menu div and cleaned up code 2015-03-11 19:19:04 +01:00
VirtualTam c133612f32 CSS: remove hardcoded style from templates
Fixes shaarli/Shaarli#29

Style elements refactored as follows:
- use existing ids and classes if possible,
- else, define new ones and stick with the existing naming convention,
- remove hardcoded style attributes from RainTPL templates.

Exception:
In tpl/tagcloud.html, the display size of each tag is computed at page
generation.

Signed-off-by: VirtualTam <virtualtam@flibidi.org>
2014-12-03 19:28:43 +01:00
nodiscc 1099d8fcad Make ATOM toolbar button optional
* ATOM button display is now configurable using the SHOW_ATOM variable in index.php or data/options.php (defaults to false)
 * Fixes https://github.com/shaarli/Shaarli/issues/24
2014-10-23 17:47:30 +02:00
Christophe HENRY ebb2880dfc Adds a configuration variable "titleLink" which allows to customize the
link on the title.
2014-07-27 23:32:41 +02:00
Sebastien SAUVAGE feebc6d466 Corrected vulnerabilities (see report below)
Title : Shaarli Vulnerabilities
Author : @erwan_lr | @_WPScan_

Vendor : http://sebsauvage.net/wiki/doku.php?id=php:shaarli
Download : https://github.com/sebsauvage/Shaarli/archive/master.zip |
http://sebsauvage.net/files/shaarli_0.0.40beta.zip
Affected versions : master-705F835, 0.0.40-beta (versions below may also
be vulnerable)

Vulnerabilities : Persistent XSS & Unvalidated Redirects and Forwards

Persistent XSS :
- During the instalation or configuration modification, the title field
is vulnerable. e.g <script>alert(1)</script>
Quotes can not be used because of var_export(), but String.fromCharCode
works

- The url field of a link is vulnerable :

When there is no redirector : javascript:alert(1)
Then, the code is triggered when a user click the url of a link

Or with a classic XSS : "><script>alert(1)</script>

Unvalidated Redirects and Forwards :
A request with the param linksperpage or privateonly can be used to
redirect a user to an arbitrary referer

e.g
GET /Audit/Shaarli/master-705f835/?linksperpage=10 HTTP/1.1
Host: 127.0.0.1
Referer: https://duckduckgo.com

History :
March 2, 2013
- Vendor contacted
2013-03-03 22:15:38 +01:00
Sébastien SAUVAGE 450342737c Initial commit (version 0.0.40 beta) 2013-02-26 10:09:41 +01:00