From a9ac9e7ceff839cc1d8ff649843bc4eca31b9008 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 20 Mar 2007 02:45:44 +0000 Subject: Added NULL sanitation to Form.pm git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@950 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'LedgerSMB') diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index f0cb545e..d5e699b4 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -71,6 +71,7 @@ sub new { $self->{nextsub} =~ s/( |-|,|\#|\/|\.$)/_/g; } + $self->{login} =~ s/[^a-zA-Z0-9._+@'-]//g; $self->{menubar} = 1 if $self->{path} =~ /lynx/i; #menubar will be deprecated, replaced with below @@ -79,6 +80,7 @@ sub new { $self->{version} = "1.2.0 Release Candidate 4"; $self->{dbversion} = "1.2.0"; + bless $self, $type; if ($self->{path} ne 'bin/lynx'){ $self->{path} = 'bin/mozilla';} @@ -93,6 +95,8 @@ sub new { if (($self->{action} =~ /:/) || ($self->{nextsub} =~ /:/)){ $self->error("Access Denied"); } + + for (keys %$self){ $self->{$_} =~ s/\000//g } $self; } -- cgit v1.2.3