annotate roundup/scripts/__init__.py @ 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 6e3e4f24c753
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
593
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
1 #
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
3 # This module is free software, and you may redistribute it and/or modify
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
4 # under the same terms as Python, so long as this copyright message and
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
5 # disclaimer are retained in their original form.
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
6 #
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
10 # POSSIBILITY OF SUCH DAMAGE.
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
11 #
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
17
2005
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1092
diff changeset
18 '''Subpackage containing the modules that implement the command
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1092
diff changeset
19 line tools.
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1092
diff changeset
20
593
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
21 Note that these are imported by script stubs generated by "setup.py".
2256f81293c1 Conversion to generated script stubs
Jürgen Hermann <jhermann@users.sourceforge.net>
parents:
diff changeset
22 '''
2005
fc52d57c6c3e documentation cleanup
Richard Jones <richard@users.sourceforge.net>
parents: 1092
diff changeset
23 __docformat__ = 'restructuredtext'
1092
e5826025eeb7 more Log removal
Richard Jones <richard@users.sourceforge.net>
parents: 593
diff changeset
24 # vim: set filetype=python ts=4 sw=4 et si

Roundup Issue Tracker: http://roundup-tracker.org/