Mercurial > p > roundup > code
comparison doc/customizing.txt @ 5232:462b0f76fce8
issue2550864 - Potential information leakage via journal/history
Fix this by making the hyperdb::Class::history function check for view
permissions on the journaled properties. So a user that sees [hidden]
for a property in the web interface doesn;t see the property changes
in the history.
While doing this, relocated the filter for quiet properties
from the templating class to the hyperdb.
Also added the skipquiet option to the history command in
roundup-admin.py to enable filtering of quiet params.
Also changed calls to history() in the backend databases to report all
items.
Changed inline documentation for all history calls that document the
actions. The create action (before nov 6 2002) used to record all
parameters. After that point the create call uses an empty dictionary.
The filtering code depends on the create dictionary being empty.
It may not operate properly on very old roundup databases.
Changed calls to logging.getLogger to roundup.hyperdb.backends to
allow filtering the back end while keeping hyperdb logging.
In cgi/templating.py, changed history() function consolidating
handiling of link and unlink actions
Added tests for quiet property filtering and permission filtering
of history.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 14 Apr 2017 23:24:18 -0400 |
| parents | 8743b7226dc7 |
| children | 15440504fb04 |
comparison
equal
deleted
inserted
replaced
| 5231:8743b7226dc7 | 5232:462b0f76fce8 |
|---|---|
| 2459 implemented**) | 2459 implemented**) |
| 2460 history render the journal of the current item as | 2460 history render the journal of the current item as |
| 2461 HTML. By default properties marked as "quiet" (see | 2461 HTML. By default properties marked as "quiet" (see |
| 2462 `design documentation`_) are not shown unless the | 2462 `design documentation`_) are not shown unless the |
| 2463 function is called with the showall=True parameter. | 2463 function is called with the showall=True parameter. |
| 2464 Properties that are not Viewable to the user are not | |
| 2465 shown. | |
| 2464 renderQueryForm specific to the "query" class - render the search form | 2466 renderQueryForm specific to the "query" class - render the search form |
| 2465 for the query | 2467 for the query |
| 2466 hasPermission specific to the "user" class - determine whether the | 2468 hasPermission specific to the "user" class - determine whether the |
| 2467 user has a Permission. The signature is:: | 2469 user has a Permission. The signature is:: |
| 2468 | 2470 |
| 3211 The final section displayed is the history of the item - its database | 3213 The final section displayed is the history of the item - its database |
| 3212 journal. This is generally generated with the template:: | 3214 journal. This is generally generated with the template:: |
| 3213 | 3215 |
| 3214 <tal:block tal:replace="structure context/history" /> | 3216 <tal:block tal:replace="structure context/history" /> |
| 3215 | 3217 |
| 3218 or:: | |
| 3219 | |
| 3220 <tal:block | |
| 3221 tal:replace="structure python:context.history(showall=True)" /> | |
| 3222 | |
| 3223 if you want to show history entries for quiet properties. | |
| 3224 | |
| 3216 *To be done:* | 3225 *To be done:* |
| 3217 | 3226 |
| 3218 *The actual history entries of the item may be accessed for manual | 3227 *The actual history entries of the item may be accessed for manual |
| 3219 templating through the "journal" method of the item*:: | 3228 templating through the "journal" method of the item*:: |
| 3220 | 3229 |
