diff options
Diffstat (limited to 'meta/recipes-devtools/subversion/subversion/subversion-CVE-2013-1847-CVE-2013-1846.patch')
-rw-r--r-- | meta/recipes-devtools/subversion/subversion/subversion-CVE-2013-1847-CVE-2013-1846.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/subversion/subversion/subversion-CVE-2013-1847-CVE-2013-1846.patch b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2013-1847-CVE-2013-1846.patch new file mode 100644 index 0000000000..f49b9a43a6 --- /dev/null +++ b/meta/recipes-devtools/subversion/subversion/subversion-CVE-2013-1847-CVE-2013-1846.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Index: subversion/mod_dav_svn/lock.c | ||
4 | =================================================================== | ||
5 | --- a/subversion/mod_dav_svn/lock.c (revision 1459696) | ||
6 | +++ b/subversion/mod_dav_svn/lock.c (working copy) | ||
7 | @@ -634,7 +634,20 @@ append_locks(dav_lockdb *lockdb, | ||
8 | svn_lock_t *slock; | ||
9 | svn_error_t *serr; | ||
10 | dav_error *derr; | ||
11 | + dav_svn_repos *repos = resource->info->repos; | ||
12 | + | ||
13 | + /* We don't allow anonymous locks */ | ||
14 | + if (! repos->username) | ||
15 | + return dav_new_error(resource->pool, HTTP_UNAUTHORIZED, | ||
16 | + DAV_ERR_LOCK_SAVE_LOCK, | ||
17 | + "Anonymous lock creation is not allowed."); | ||
18 | |||
19 | + /* Not a path in the repository so can't lock it. */ | ||
20 | + if (! resource->info->repos_path) | ||
21 | + return dav_new_error(resource->pool, HTTP_BAD_REQUEST, | ||
22 | + DAV_ERR_LOCK_SAVE_LOCK, | ||
23 | + "Attempted to lock path not in repository."); | ||
24 | + | ||
25 | /* If the resource's fs path is unreadable, we don't allow a lock to | ||
26 | be created on it. */ | ||
27 | if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM, | ||
28 | @@ -657,7 +670,6 @@ append_locks(dav_lockdb *lockdb, | ||
29 | svn_fs_txn_t *txn; | ||
30 | svn_fs_root_t *txn_root; | ||
31 | const char *conflict_msg; | ||
32 | - dav_svn_repos *repos = resource->info->repos; | ||
33 | apr_hash_t *revprop_table = apr_hash_make(resource->pool); | ||
34 | apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR, | ||
35 | APR_HASH_KEY_STRING, svn_string_create(repos->username, | ||
36 | @@ -734,7 +746,7 @@ append_locks(dav_lockdb *lockdb, | ||
37 | |||
38 | /* Convert the dav_lock into an svn_lock_t. */ | ||
39 | derr = dav_lock_to_svn_lock(&slock, lock, resource->info->repos_path, | ||
40 | - info, resource->info->repos->is_svn_client, | ||
41 | + info, repos->is_svn_client, | ||
42 | resource->pool); | ||
43 | if (derr) | ||
44 | return derr; | ||
45 | @@ -741,7 +753,7 @@ append_locks(dav_lockdb *lockdb, | ||
46 | |||
47 | /* Now use the svn_lock_t to actually perform the lock. */ | ||
48 | serr = svn_repos_fs_lock(&slock, | ||
49 | - resource->info->repos->repos, | ||
50 | + repos->repos, | ||
51 | slock->path, | ||
52 | slock->token, | ||
53 | slock->comment, | ||