From 695481e210e60cbb90817302c3e904667987e9e2 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Fri, 4 Jan 2013 11:04:08 -0700 Subject: [PATCH] charnames: Enforce better file name rules The code says that identifier syntax is required for a file name, but the code accepted any sequence of \w's. --- lib/_charnames.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_charnames.pm b/lib/_charnames.pm index 7f2e5f7..4a8aa42 100644 --- a/lib/_charnames.pm +++ b/lib/_charnames.pm @@ -214,7 +214,7 @@ sub alias_file ($) # Reads a file containing alias definitions if (-f $arg && File::Spec->file_name_is_absolute ($arg)) { $file = $arg; } - elsif ($arg =~ m/^\w+$/) { + elsif ($arg =~ m/ ^ \p{_Perl_IDStart} \p{_Perl_IDCont}* $/x) { $file = "unicore/${arg}_alias.pl"; } else { -- 2.7.4