Package: websvn
Version: 1.61-20
Tags: patch

Hi,

When accessing a non-existant repository while using websvn (e.g.: 
http://svn.example.org/wsvn/nonexistant, the user gets this message:

Fatal error: Call to a member function on a non-object in /etc/websvn/wsvn.php 
on line 102

That's not a nice error, and since this is not a proper 404 page, also 
presents the problem that guys like Google keep the page in their caches and 
not drop it. It's also not detected by link checkers.

Such a situation can exist by a typo, but e.g. also when a repository is 
removed.

Attached patch to the current unstable version fixes this. Please apply and 
forward upstream.


thanks!
Thijs
--- wsvn.php.orig	2004-08-24 15:53:31.000000000 +0200
+++ wsvn.php	2007-07-20 15:41:20.000000000 +0200
@@ -78,6 +78,12 @@
    }
       
    $rep = $config->findRepository($name);
+   if ( ! $rep ) {
+       header("HTTP/1.0 404 Not Found");
+       echo "<html><body>The repository \"" . htmlspecialchars($name) .
+          "\" could not be found.</body></html>\n";
+       exit;
+   }
    createProjectSelectionForm();
    $vars["allowdownload"] = $rep->getAllowDownload();
 

Attachment: pgp198fx3YXte.pgp
Description: PGP signature

Reply via email to