6712ef
6712ef
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-8108
6712ef
6712ef
http://subversion.apache.org/security/CVE-2014-8108-advisory.txt
6712ef
6712ef
--- subversion-1.7.14/subversion/mod_dav_svn/repos.c.cve8108
6712ef
+++ subversion-1.7.14/subversion/mod_dav_svn/repos.c
6712ef
@@ -506,6 +506,9 @@ parse_vtxnstub_uri(dav_resource_combined
6712ef
   if (parse_txnstub_uri(comb, path, label, use_checked_in))
6712ef
     return TRUE;
6712ef
 
6712ef
+  if (!comb->priv.root.txn_name)
6712ef
+    return TRUE;
6712ef
+
6712ef
   comb->priv.root.vtxn_name = comb->priv.root.txn_name;
6712ef
   comb->priv.root.txn_name = dav_svn__get_txn(comb->priv.repos,
6712ef
                                               comb->priv.root.vtxn_name);
6712ef
@@ -574,6 +577,9 @@ parse_vtxnroot_uri(dav_resource_combined
6712ef
   if (parse_txnroot_uri(comb, path, label, use_checked_in))
6712ef
     return TRUE;
6712ef
 
6712ef
+  if (!comb->priv.root.txn_name)
6712ef
+    return TRUE;
6712ef
+
6712ef
   comb->priv.root.vtxn_name = comb->priv.root.txn_name;
6712ef
   comb->priv.root.txn_name = dav_svn__get_txn(comb->priv.repos,
6712ef
                                               comb->priv.root.vtxn_name);
6712ef
@@ -919,6 +925,10 @@ prep_working(dav_resource_combined *comb
6712ef
      point. */
6712ef
   if (txn_name == NULL)
6712ef
     {
6712ef
+      if (!comb->priv.root.activity_id)
6712ef
+        return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0,
6712ef
+                                  "The request did not specify an activity ID");
6712ef
+
6712ef
       txn_name = dav_svn__get_txn(comb->priv.repos,
6712ef
                                   comb->priv.root.activity_id);
6712ef
       if (txn_name == NULL)
6712ef
@@ -1029,8 +1039,13 @@ prep_working(dav_resource_combined *comb
6712ef
 static dav_error *
6712ef
 prep_activity(dav_resource_combined *comb)
6712ef
 {
6712ef
-  const char *txn_name = dav_svn__get_txn(comb->priv.repos,
6712ef
-                                          comb->priv.root.activity_id);
6712ef
+  const char *txn_name;
6712ef
+
6712ef
+  if (!comb->priv.root.activity_id)
6712ef
+    return dav_svn__new_error(comb->res.pool, HTTP_BAD_REQUEST, 0,
6712ef
+                              "The request did not specify an activity ID");
6712ef
+
6712ef
+  txn_name = dav_svn__get_txn(comb->priv.repos, comb->priv.root.activity_id);
6712ef
 
6712ef
   comb->priv.root.txn_name = txn_name;
6712ef
   comb->res.exists = txn_name != NULL;