diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-21 19:21:13 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-21 19:21:13 +0000 |
commit | 304d95fa421f539804cf29d2946b0dca384bfe6d (patch) | |
tree | c0d68acd9dc0add5c3385b1e80d0f182ad42bce0 /scripts | |
parent | mark insecure (diff) | |
download | w3m-304d95fa421f539804cf29d2946b0dca384bfe6d.tar.gz w3m-304d95fa421f539804cf29d2946b0dca384bfe6d.zip |
more restrict tlang
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/w3mhelp.cgi.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/w3mhelp.cgi.in b/scripts/w3mhelp.cgi.in index 2045224..87ab916 100644 --- a/scripts/w3mhelp.cgi.in +++ b/scripts/w3mhelp.cgi.in @@ -1,5 +1,5 @@ #!@PERL@ -# $Id: w3mhelp.cgi.in,v 1.4 2001/12/21 18:33:41 ukai Exp $ +# $Id: w3mhelp.cgi.in,v 1.5 2001/12/21 19:21:13 ukai Exp $ $helpdir = "@HELP_DIR@"; unshift(@INC, $helpdir); @@ -28,6 +28,7 @@ if (defined($ENV{'QUERY_STRING'})) { local($tlang) = $2; $tlang =~ s/\+|%([0-9A-Fa-f][0-9A-Fa-f])/$& eq '+' ? ' ' : pack('C', hex($1))/ge; $tlang =~ tr/A-Z/a-z/; + $tlang =~ s/([a-z][a-z]).*/$1/; # lang code is 'en', 'ja', ... print "tlang=$tlang\n"; eval {require "w3mhelp-funcdesc.$tlang.pl";}; if (defined(%funcdesc)) { |