Commit graph

57 commits

Author SHA1 Message Date
Marcin Kuzminski
bd1a9c8201 docs: updated copyrights to 2019 2019-01-02 18:13:27 +01:00
Marcin Kuzminski
a95bd9622c svn: support proxy-prefix properly fixes #5521 2018-12-20 01:01:02 +01:00
Marcin Kuzminski
e8ec810de8 app: disconect auth plugin loading from authentication registry.
- introduce load_all flag used in skip application load time for certain actions
2018-11-26 00:15:05 +01:00
Marcin Kuzminski
f0ff76a829 core: use py3 compatible prints 2018-09-12 09:47:41 +02:00
Marcin Kuzminski
225757aaf3 hooks: made the callback host configurable.
- This allows easier docker container seperation
2018-07-03 11:57:03 +02:00
Marcin Kuzminski
42c80fe075 shadow-repos: use numeric repo id for creation of shadow repos.
- Fixes a problem after rename or move into repository group.
2018-06-21 14:04:06 +02:00
Marcin Kuzminski
7d870ea83a mercurial: protocol security updates.
- fixes Mercurial CVE for lack of permissions checking on mercurial batch commands
- more strict checks for permissions, now default to push instead of pull
to be always on safe side.
- decypher batch commands and pick top-most permission to be used
2018-04-25 13:10:52 +02:00
Marcin Kuzminski
bdf5f0afb6 svn: enable hooks and integration framework execution.
- This change will allow SVN to execute rhodecode integration framework
via executing the builting hooks.
- uses txn_id for svn to provide metadata required via Apache
- Interception of SVN transaction is required to use temporary stores for metadata
- hooks are now part of vcsserver where the install/control logic is stored
2018-04-06 12:44:01 +02:00
Marcin Kuzminski
00b45c1fa7 release: update copyright year to 2018 2018-01-19 17:13:16 +01:00
Marcin Kuzminski
4f426c33f5 tests: rewrote code for running vcs_operations. Now it starts it's own
configurable instances for exactly those tests.
2017-12-18 21:19:29 +01:00
Marcin Kuzminski
1fccd17a6d auth, performance: use cache_ttl for anonymous access taken from the rhodecode plugin.
- for operations like svn this boosts performance significantly for anonymous access enabled.
2017-12-04 14:20:53 +01:00
Marcin Kuzminski
245d213bf2 vcs: also register a global config for vcs_handler.
- this solves a case when SVN repository needs to find out a repo without
per-repo settings available
- we need to get the global config first to be able to extract repo name
2017-11-28 13:23:25 +01:00
Marcin Kuzminski
1d332c03ad pylons: fixed code and test suite after removal of pylons. 2017-11-16 18:27:09 +01:00
Marcin Kuzminski
5f9ae2ae11 pylons: remove pylons as dependency
- dependencies: bumped:
 -setuptools-scm==1.15.6
 -celery==4.1.0
 -kombu==4.1.0
 -pytz==2017.3
 -Routes==2.4.1

Removed all pylons components. Refactored the code to use only pyramid
parts
2017-11-15 13:42:54 +01:00
Marcin Kuzminski
f445addfdd vcs: reduce sql queries used during pull/push operations. 2017-09-28 21:45:19 +02:00
Marcin Kuzminski
a8d0784226 tests: fixed tests for random dict order could sometimes break the tests 2017-09-20 23:33:29 +02:00
Marcin Kuzminski
3f0ff6b65b vcs: report 404 for shadow repos that are not existing anymore. Before we got 500 exception in this case. 2017-09-01 13:10:52 +02:00
Marcin Kuzminski
68cdaa3763 pyramid: remove csrf tests because this was only used in pylons. 2017-07-13 09:56:15 +02:00
Marcin Kuzminski
71071c0b26 dependencies: bumped pyramid to 1.9 webob to 1.7.3 and webtest to 2.0.27
- fixed some core tests for new webob/webtest
- changed core methods to make them more pyramid compat.
2017-07-12 22:54:14 +02:00
Marcin Kuzminski
71fee00277 home: moved home and repo group views into pyramid.
- fixed lots of tests related to those changes
- now main and subrepo group views are handled by pyramid.
2017-06-05 15:16:04 +02:00
Marcin Kuzminski
1f812d6a5e caches: ensure we don't use non-ascii characters in cache keys.
- this could before lead to problems in beaker cache implementation.
2017-05-15 22:10:36 +02:00
Marcin Kuzminski
858dfef419 git-lfs: settings for GIT repos to enable git-lfs and set store location
- ref #4235
2017-03-21 17:23:28 +01:00
Marcin Kuzminski
ca9e08007f git-lfs: added tests for git-lfs protocol detection
- refs #4235
2017-03-17 15:48:07 +01:00
Marcin Kuzminski
3d3f2db34a core: removed pyro4 from Enterprise code. Fixes #5198 2017-02-07 15:58:49 +01:00
Marcin Kuzminski
fcc027c282 license: updated copyright year to 2017 2017-01-02 09:30:39 +01:00
Marcin Kuzminski
4a415909c6 tests: use custom test app for better debug of .mustcontain function.
- now output of html of .mustcontain we save as physical files.
2016-12-21 19:32:41 +01:00
Martin Bornhold
a9a4e32eed subprocess: Change all imports from subprocess -> subprocess32 2016-10-14 09:37:44 +02:00
Martin Bornhold
88a384f13c tests: Fix error introduced by rebasing. 2016-10-11 13:27:51 +02:00
Martin Bornhold
2b09ada931 tests: Make test work with either http or pyro4 protocol. 2016-10-10 14:32:46 +02:00
Martin Bornhold
efcfc61e67 tests: Fix test that expects the pyro4 scm app as default. 2016-10-07 10:32:28 +02:00
Martin Bornhold
ecc24326d7 vcs: Do not pass the backend key into the scm app instances.
We used the key as a value for a response header. Since this header is removed there
is no need to pass the backend key araound.
2016-10-06 16:25:27 +02:00
Martin Bornhold
c6466346b4 vcs: Remove custom response header which contains backend key.
We used this custom header to skip the error handling.
This is no linger needed since the VCS middleware is moved above of the error handling.
2016-10-06 16:10:40 +02:00
Martin Bornhold
861adffd82 tests: Add a way to deactivate exception re-raising in tests. 2016-10-07 09:15:43 +02:00
Martin Bornhold
cc4ab6dae7 tests: Use only one place to define pr and shadow URL segments. 2016-09-28 13:40:01 +02:00
Martin Bornhold
974c9b8766 tests: Add tests to check the shadow-repo regular expression. 2016-09-28 13:26:30 +02:00
Martin Bornhold
ad14211248 tests: Adapt test to recent changes.
This argument was removed.
2016-09-27 09:48:59 +02:00
Martin Bornhold
0a34a8c1df tests: Fix tests which need the DB to run. 2016-09-27 09:48:42 +02:00
Martin Bornhold
ae2b380d5b tests: Add tests to check the shadow repo exposure of the simplevcs class. 2016-09-26 14:55:30 +02:00
Martin Bornhold
16bac867f5 tests: Make return values of stub vcs controller editable. 2016-09-26 14:54:58 +02:00
Martin Bornhold
3c6a97202a tests: Add new attribute is_shadow_repo to test dummy extra data. 2016-09-23 14:31:36 +02:00
Johannes Bornhold
08a2b45999 vcs: Minimal change to expose the shadow repository
Based on my original research, this was the "minimal" starting point. It shows
that three concepts are needed for the "repo_name":

* From the security standpoint we think of the shadow repository having the same
  ACL as the target repository of the pull request. This is because the pull
  request itself is considered to be a part of the target repository.

  Out of this thought, the variable "acl_repo_name" is used whenever we want to
  check permissions or when we need the database configuration of the
  repository. An alternative name would have been "db_repo_name", but the usage
  for ACL checking is the most important one.

* From the web interaction perspective, we need the URL which was originally
  used to get to the repository. This is because based on this base URL commands
  can be identified. Especially for Git this is important, so that the commands
  are correctly recognized.

  Since the URL is in the focus, this is called "url_repo_name".

* Finally we have to deal with the repository on the file system. This is what
  the VCS layer deal with normally, so this name is called "vcs_repo_name".


The original repository interaction is a special case where all three names are
the same.

When interacting with a pull request, these three names are typically all
different.

This change is minimal in a sense that it just makes the interaction with a
shadow repository barely work, without checking any special constraints yet.
This was the starting point for further work on this topic.
2016-09-18 20:01:19 +02:00
Martin Bornhold
cf6af66533 tests: Adapt tests to recent changes in vcs lib. 2016-09-26 15:43:55 +02:00
Martin Bornhold
8e531005da pyro4: Add the custom header X-RhodeCode-Backend to the pyro4 backend responses.
This custom header sets the SCM backend which is in use. It is used to identify
VCS responses in the error handler. VCS responses are skipped during error handling.
2016-09-26 14:52:06 +02:00
Marcin Kuzminski
df353f19ea vcs: register repo_name as specialized middleware variables instead
of relying on env variables.

- use order of defined vcs.backends to detect middleware for handling requests
2016-09-06 19:49:28 +02:00
Marcin Kuzminski
d92e030879 vcs: moved svn proxy settings into vcs related settings
- vcs middleware now returns dummyHandler if not configured
- propagate the per-repo vcs related configs into VCSMiddleware
- moved the forms arround and group things into more logical blocks
2016-09-06 12:29:54 +02:00
Daniel Dourvaris
f9e2cd26fe tests: disable pretty error page handler for tests, with option to
disable when testing error pages, fixes #4208
2016-09-02 09:24:57 +03:00
Daniel Dourvaris
5a3574412b vcs-error: replace disable_vcs middleware with vcs and http exceptions
to avoid vcs connection errors showing to the end user fixes #4140
2016-08-17 07:12:38 +03:00
Martin Bornhold
6fce04f6d1 tests: Adapt tests to recent changes. 2016-08-09 16:34:03 +02:00
Martin Bornhold
d7ee3ddb9b tests: Add custom header to expected headers 2016-08-09 16:33:38 +02:00
Martin Bornhold
3273b9efca tests: Use settings dict from fixture instead of grabbing it from the WSGI app stack. 2016-08-08 15:03:03 +02:00