This file is indexed.

/usr/share/netdisco/html/change_pw.html is in netdisco-frontend 1.0-2.

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
<h1 class="pagehead">Changing Password for user <%$user|h%></h1>
<& SELF:error &>
% unless (defined $cmd and $cmd eq 'change'){
    <& SELF:change &>
% }
<%args>
$pw1 => undef
$pw2 => undef
$cmd => undef
</%args>
<%shared>
my $user   = $m->session->{user};
my $userip = $r->connection->remote_ip; 
my $secure = &is_secure;
my $err    = '';
</%shared>
<%init>
# Send to https if not secure.
unless ($secure){
    my $url = url_secure($r->uri);
    $m->redirect($url);
}

unless ($user){
    $err = "Who are you?";
    $cmd = undef;
}

unless ($m->session->{useuserdb}) {
    $err = "You can't change your apache password this way.";
    $cmd = undef;
}

if ($cmd eq 'change'){
    unless ($pw1 eq $pw2){
        $err = "Passwords do not match.<BR>";
    }

    unless ($err){
        my $rv = netdisco::user_add($user,('pw' => $pw1));
        $err .= $rv ? "Could not Change Password! $rv<BR>\n" : "Password for $user changed.<BR>\n";

        # Log Change Password
        insert_or_update('user_log',{},
                {'username'=>$user,'event'=>'pw_change',
                 'userip'=>$userip,'details' => $rv ? 'Failed' : 'Succeeded'});
    }
    undef $cmd;
}
</%init>
<%method change>
<FORM ACTION="<%$r->uri%>" METHOD=POST>
<DIV>
<INPUT TYPE="hidden" NAME="cmd" VALUE="change">
<TABLE CLASS="adm-search">
<TR>
    <TH>Enter New Password:</TH>
    <TD><INPUT TYPE="PASSWORD" NAME="pw1" SIZE=10 MAXLENGTH=30></TD>
</TR>
<TR>
    <TH>Enter Password Again:</TH>
    <TD><INPUT TYPE="PASSWORD" NAME="pw2" SIZE=10 MAXLENGTH=30></TD>
</TR>
<TR>
    <TH>&nbsp;</TH>
    <TD><INPUT TYPE="submit" CLASS="navbutton" VALUE="Change Password for <%$user|h%>"></TD>
</TR>
</TABLE>
</DIV>
</FORM>
</%method>
<%method error>
% return unless $err;
<h1 class="pagehead"><%$err%></h1>
</%method>
<%method title>
- Change Password \
</%method>
%# $Id: change_pw.html,v 1.7 2007/12/19 06:24:34 maxbaker Exp $
%# vim:syntax=mason