summaryrefslogtreecommitdiffstats
path: root/blog
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-01 16:44:07 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-06-01 16:44:07 +0800
commit9c5bee7dc907e7b359470f7479e7f00790af0920 (patch)
treeca884091008921a0454f2eddd27345373dfeb731 /blog
parent736e655db85cdda4198aa8459280a69056e98312 (diff)
downloadpttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.tar
pttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.tar.gz
pttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.tar.bz2
pttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.tar.lz
pttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.tar.xz
pttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.tar.zst
pttbbs-9c5bee7dc907e7b359470f7479e7f00790af0920.zip
allow brdname has -
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@917 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'blog')
-rwxr-xr-xblog/blog.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/blog/blog.pl b/blog/blog.pl
index 6f77f858..0106db76 100755
--- a/blog/blog.pl
+++ b/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);