diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-01 16:44:07 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-06-01 16:44:07 +0800 |
commit | 78bed9eef483e7367b4a0b171d910713f6dcdc91 (patch) | |
tree | fac621872aed6442329cbb0620babf814a30ca37 | |
parent | 1b8913058fb642723ce9a47d7bc1a78783afc86f (diff) | |
download | pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.tar pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.tar.gz pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.tar.bz2 pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.tar.lz pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.tar.xz pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.tar.zst pttbbs-78bed9eef483e7367b4a0b171d910713f6dcdc91.zip |
allow brdname has -
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@917 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-x | pttbbs/blog/blog.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pttbbs/blog/blog.pl b/pttbbs/blog/blog.pl index 6f77f858..0106db76 100755 --- a/pttbbs/blog/blog.pl +++ b/pttbbs/blog/blog.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: blog.pl,v 1.10 2003/05/31 12:40:27 in2 Exp $ +# $Id: blog.pl,v 1.11 2003/06/01 08:44:07 in2 Exp $ use CGI qw/:standard/; use LocalVars; use DB_File; @@ -26,11 +26,11 @@ sub main print header(-status => 400); return; } - if( !(($brdname, $fn) = $ENV{PATH_INFO} =~ m|/(\w+?)/([\.,\w]*)|) || - !( ($fn, $y, $m, $d) = parsefn($fn) ) || - !(-e "$BLOGDATA/$brdname/$fn") || + if( !(($brdname, $fn) = $ENV{PATH_INFO} =~ m|/([\w\-]+?)/([\.,\w]*)|) || + !( ($fn, $y, $m, $d) = parsefn($fn) ) || + !(-e "$BLOGDATA/$brdname/$fn") || !(tie %config, 'DB_File', - "$BLOGDATA/$brdname/config.db", O_RDONLY, 0666, $DB_HASH) || + "$BLOGDATA/$brdname/config.db", O_RDONLY, 0666, $DB_HASH) || !(tie %attr, 'DB_File', "$BLOGDATA/$brdname/attr.db", O_RDONLY, 0666, $DB_HASH) ){ print header(-status => 404); |