This file is indexed.

/usr/share/pyshared/MoinMoin/action/login.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - login action

    The real login is done in MoinMoin.request.
    Here is only some user notification in case something went wrong.

    @copyright: 2005-2006 Radomirs Cirskis <nad2000@gmail.com>,
                2006 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.
"""

from MoinMoin import userform, wikiutil
from MoinMoin.Page import Page
from MoinMoin.widget import html

def execute(pagename, request):
    return LoginHandler(pagename, request).handle()

class LoginHandler:
    def __init__(self, pagename, request):
        self.request = request
        self._ = request.getText
        self.cfg = request.cfg
        self.pagename = pagename
        self.page = Page(request, pagename)

    def handle_multistage(self):
        """Handle a multistage request.

        If the auth handler wants a multistage request, we
        now set up the login form for that.
        """
        _ = self._
        request = self.request
        form = html.FORM(method='POST', name='logincontinue', action=self.pagename)
        form.append(html.INPUT(type='hidden', name='action', value='login'))
        form.append(html.INPUT(type='hidden', name='login', value='1'))
        form.append(html.INPUT(type='hidden', name='stage',
                               value=request._login_multistage_name))

        request.theme.send_title(_("Login"), pagename=self.pagename)
        # Start content (important for RTL support)
        request.write(request.formatter.startContent("content"))

        extra = request._login_multistage(request, form)
        request.write(unicode(form))
        if extra:
            request.write(extra)

        request.write(request.formatter.endContent())
        request.theme.send_footer(self.pagename)
        request.theme.send_closing_html()

    def handle(self):
        _ = self._
        request = self.request
        form = request.values

        error = None

        islogin = form.get('login', '')

        if islogin: # user pressed login button
            if request._login_multistage:
                return self.handle_multistage()
            if hasattr(request, '_login_messages'):
                for msg in request._login_messages:
                    request.theme.add_msg(wikiutil.escape(msg), "error")
            return self.page.send_page()

        else: # show login form
            request.theme.send_title(_("Login"), pagename=self.pagename)
            # Start content (important for RTL support)
            request.write(request.formatter.startContent("content"))

            request.write(userform.getLogin(request))

            request.write(request.formatter.endContent())
            request.theme.send_footer(self.pagename)
            request.theme.send_closing_html()