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