improve fix for symlink attacks to check subdirectories for symlinks too
[ikiwiki.git] / IkiWiki / CGI.pm
index b47c8e8038d1c1d00a4d70b3c7349610e8702b19..f360b6778d9c78c1a227d755aa6b4f03e0d76018 100644 (file)
@@ -425,7 +425,7 @@ sub cgi_editpage ($$) { #{{{
                my $content=$form->field('content');
                $content=~s/\r\n/\n/g;
                $content=~s/\r/\n/g;
-               writefile("$config{srcdir}/$file", $content);
+               writefile($file, $config{srcdir}, $content);
                
                my $message="web commit ";
                if (length $session->param("name")) {