[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [814] branches/1.2/LedgerSMB/Form.pm



Revision: 814
          http://svn.sourceforge.net/ledger-smb/?rev=814&view=rev
Author:   einhverfr
Date:     2007-02-17 17:04:00 -0800 (Sat, 17 Feb 2007)

Log Message:
-----------
Adding blacklisting for languages

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-02-18 00:56:26 UTC (rev 813)
+++ branches/1.2/LedgerSMB/Form.pm	2007-02-18 01:04:00 UTC (rev 814)
@@ -582,6 +582,9 @@
 	my $ok;
 
 	if ($self->{language_code}) {
+		if ($self->{language_code} =~ /(\.\.|\/|\*)/){
+			$self->error("Invalid Language Code");
+		}
 
 		if (-f "$self->{templates}/$self->{language_code}/$self->{IN}") {
 			open(IN, '<', "$self->{templates}/$self->{language_code}/$self->{IN}") or $self->error("$self->{IN} : $!");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.