Revision d3160c04
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Controller/Admin.pm | ||
---|---|---|
455 | 455 |
sub login_form { |
456 | 456 |
my ($self, %params) = @_; |
457 | 457 |
$::request->layout->focus('#admin_password'); |
458 |
$self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $::form->{version}), %params);
|
|
458 |
$self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $::form->read_version), %params);
|
|
459 | 459 |
} |
460 | 460 |
|
461 | 461 |
sub edit_user_form { |
SL/Form.pm | ||
---|---|---|
86 | 86 |
undef $standard_dbh; |
87 | 87 |
} |
88 | 88 |
|
89 |
sub read_version { |
|
90 |
my ($self) = @_; |
|
91 |
|
|
92 |
open VERSION_FILE, "VERSION"; # New but flexible code reads version from VERSION-file |
|
93 |
my $version = <VERSION_FILE>; |
|
94 |
$version =~ s/[^0-9A-Za-z\.\_\-]//g; # only allow numbers, letters, points, underscores and dashes. Prevents injecting of malicious code. |
|
95 |
close VERSION_FILE; |
|
96 |
|
|
97 |
return $version; |
|
98 |
} |
|
99 |
|
|
89 | 100 |
sub new { |
90 | 101 |
$main::lxdebug->enter_sub(); |
91 | 102 |
|
... | ... | |
101 | 112 |
|
102 | 113 |
bless $self, $type; |
103 | 114 |
|
104 |
open VERSION_FILE, "VERSION"; # New but flexible code reads version from VERSION-file |
|
105 |
$self->{version} = <VERSION_FILE>; |
|
106 |
close VERSION_FILE; |
|
107 |
$self->{version} =~ s/[^0-9A-Za-z\.\_\-]//g; # only allow numbers, letters, points, underscores and dashes. Prevents injecting of malicious code. |
|
115 |
$self->{version} = $self->read_version; |
|
108 | 116 |
|
109 | 117 |
$main::lxdebug->leave_sub(); |
110 | 118 |
|
Auch abrufbar als: Unified diff
Versionsanzeige im Adminlogin nach forçiertem Logout fixen