File tree Expand file tree Collapse file tree 5 files changed +58
-6
lines changed Expand file tree Collapse file tree 5 files changed +58
-6
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,9 @@ Fixed:
457457- CSRF protection broke the retire function for query edit. Fix
458458 javascript and make sure csrf tokens are provided in the right
459459 places. (John Rouillard)
460+ - query.item.html was missing checks to verify that a query should
461+ be visible to the user. This is fixed and users can only view
462+ queries that they own or that are not private. (John Rouillard)
460463
4614642016-01-11: 1.5.1
462465
Original file line number Diff line number Diff line change @@ -518,6 +518,19 @@ interface. Once in the "Queries I created" section and again in the
518518"Queries others created" section of the query edit page
519519(``http..../query?@template=edit``).
520520
521+ Fix security issues in query.item.html template
522+ -----------------------------------------------
523+ The default query.item.html template allows anybody to view all
524+ queries.
525+
526+ This has been updated in the classic, devel and responsive templates
527+ to only allow people to view queries they creates or queries that are
528+ publicly viewable.
529+
530+ If you haven't modified you query.item.html template, simply copy the
531+ query.item.html template from one of the above default templates to
532+ your tracker's html directory.
533+
521534Enhancement to check command for Permissions
522535--------------------------------------------
523536
Original file line number Diff line number Diff line change 11<!-- query.item -->
2- < span tal:replace ="structure context/renderQueryForm " />
3-
2+ < span tal:condition ="context/is_view_ok " tal:replace ="structure
3+ context/renderQueryForm " />
4+ < tal:block tal:condition ="not:context/is_view_ok ">
5+ < tal:block metal:use-macro ="templates/page/macros/icing ">
6+ < title metal:fill-slot ="head_title "> You can not view query</ title >
7+ < tal:block metal:fill-slot ="body_title ">
8+ You can not view query.
9+ </ tal:block >
10+ < td class ="content " metal:fill-slot ="content ">
11+ You are not allowed to view < span tal:content ="context/_classname "/>
12+ with id < span tal:content ="context/id "/>
13+ </ td >
14+ </ tal:block >
15+ </ tal:block >
Original file line number Diff line number Diff line change 11<!-- query.item -->
2- < span tal:replace ="structure context/renderQueryForm " />
3-
2+ < span tal:condition ="context/is_view_ok " tal:replace ="structure
3+ context/renderQueryForm " />
4+ < tal:block tal:condition ="not:context/is_view_ok ">
5+ < tal:block metal:use-macro ="templates/page/macros/icing ">
6+ < title metal:fill-slot ="head_title "> You can not view query</ title >
7+ < tal:block metal:fill-slot ="body_title ">
8+ You can not view query.
9+ </ tal:block >
10+ < td class ="content " metal:fill-slot ="content ">
11+ You are not allowed to view < span tal:content ="context/_classname "/>
12+ with id < span tal:content ="context/id "/>
13+ </ td >
14+ </ tal:block >
15+ </ tal:block >
Original file line number Diff line number Diff line change 11<!-- query.item -->
2- < span tal:replace ="structure context/renderQueryForm " />
3-
2+ < span tal:condition ="context/is_view_ok " tal:replace ="structure
3+ context/renderQueryForm " />
4+ < tal:block tal:condition ="not:context/is_view_ok ">
5+ < tal:block metal:use-macro ="templates/page/macros/icing ">
6+ < title metal:fill-slot ="head_title "> You can not view query</ title >
7+ < tal:block metal:fill-slot ="body_title ">
8+ You can not view query.
9+ </ tal:block >
10+ < td class ="content " metal:fill-slot ="content ">
11+ You are not allowed to view < span tal:content ="context/_classname "/>
12+ with id < span tal:content ="context/id "/>
13+ </ td >
14+ </ tal:block >
15+ </ tal:block >
You can’t perform that action at this time.
0 commit comments