This file is indexed.

/usr/share/pyshared/MoinMoin/macro/Action.py is in python-moinmoin 1.9.3-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - Create an action link

    @copyright: 2004, 2007 Johannes Berg <johannes@sipsolutions.net>
                2007 by MoinMoin:ReimarBauer
    @license: GNU GPL, see COPYING for details.
"""

from MoinMoin import wikiutil

Dependencies = ["language"]


def _get_valid_actions(macro):
    """ lists all valid actions """
    from MoinMoin import action
    # builtin
    actions_builtin = action.names
    # global
    actions_global = ([x for x in action.modules
                       if not x in macro.request.cfg.actions_excluded])
    # local
    actions_local = ([x for x in wikiutil.wikiPlugins('action', macro.cfg)
                      if not x in macro.request.cfg.actions_excluded])

    return actions_builtin + actions_global + actions_local

def macro_Action(macro, action=u'show', text=None, _kwargs=None):
    _ = macro.request.getText
    if text is None:
        text = action
    if not _kwargs:
        _kwargs = {}

    text = _(text)
    if action in _get_valid_actions(macro):
        page = macro.formatter.page
        _kwargs['action'] = action
        url = page.url(macro.request, querystr=_kwargs)
        return ''.join([
            macro.formatter.url(1, url, css='action'),
            macro.formatter.text(text),
            macro.formatter.url(0),
        ])
    else:
        return macro.formatter.text(text)