From 030ef4038357cabe10ecd747c8d163624ef812e7 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Mon, 19 Mar 2007 18:53:52 +0000 Subject: Removing per-login script feature git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@948 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 7 ++----- bin/login.pl | 6 ------ menu.pl | 2 -- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 9f37ad09..e873622d 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -79,11 +79,8 @@ sub new { bless $self, $type; - $self->{path} =~ s#\\#/#g; - if (($self->{path}) && ($self->{path} !~ m#^bin/#) - || ($self->{path} =~ m#(\w*/){2,}#)){ - $self->error("Access Denied"); - } + if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';} + if (($self->{script} =~ m#(..|\\|/)#)){ $self->error("Access Denied"); } diff --git a/bin/login.pl b/bin/login.pl index 0caf8114..96c0cb64 100755 --- a/bin/login.pl +++ b/bin/login.pl @@ -78,12 +78,6 @@ if (-f "bin/custom/$form->{script}") { $form->error(__FILE__.':'.__LINE__.': '.$@) if ($@); } -# per login customization -if (-f "bin/custom/$form->{login}_$form->{script}") { - eval { require "bin/custom/$form->{login}_$form->{script}"; }; - $form->error(__FILE__.':'.__LINE__.': '.$@) if ($@); -} - # window title bar, user info $form->{titlebar} = "LedgerSMB ".$locale->text('Version'). " $form->{version}"; diff --git a/menu.pl b/menu.pl index bf32547b..12e2e50a 100755 --- a/menu.pl +++ b/menu.pl @@ -110,8 +110,6 @@ $SIG{__DIE__} = sub { $form->error(__FILE__.':'.__LINE__.': '.$_[0]) }; map { $form->{$_} = $myconfig{$_} } qw(stylesheet timeout) unless ($form->{type} eq 'preferences'); $form->db_init(\%myconfig); -if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';} - # did sysadmin lock us out if (-f "${LedgerSMB::Sysconfig::userspath}/nologin") { $form->error(__FILE__.':'.__LINE__.': '.$locale->text('System currently down for maintenance!')); -- cgit v1.2.3