Project

General

Profile

Bug #5608

svn+ssh user set incorrectly

Added by Luke Mauldin 4 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
31.03.2020
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Scenario:

  1. Create a repository teststructure
  2. Checkout the repository via svn+ssh
  3. Add a file commit it
  4. Edit the file and commit it

Expected: the author of the SVN commit should be the user performing the commit. Actual: rhodecode is set as the author of the commit.
If I checkout the repository using https + svn, then the author is set correctly in the commit.

See the below debugging information.

vim trunk/foo/test_b.sql
svn commit -m "Updating file again"
2020-03-31 09:55:19.903 [71611] DEBUG [rhodecode.config.middleware] DEBUG MODE ON | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.903 [71611] DEBUG [rhodecode.config.middleware] Using the following Mako template directories: ['rhodecode:templates'] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.904 [71611] DEBUG [rhodecode.config.middleware] Using the following pyramid.includes: [] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.938 [71611] INFO  [rhodecode.model] RhodeCode 4.18.2 initializing db for postgresql://rhodecode:XXXXX@127.0.0.1:5432/rhodecode | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.939 [71611] INFO  [rhodecode.config.environment] Enabled VCS backends: ['svn', 'git'] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.942 [71611] DEBUG [rhodecode.config.middleware] Initializing main includeme from middleware.pyc | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.967 [71611] DEBUG [rhodecode.lib.rc_cache] dogpile: found following cache regions: set(['cache_perms', 'cache_repo_longterm', 'sql_cache_short', 'cache_license', 'cache_repo']) | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.971 [71611] DEBUG [rhodecode.lib.rc_cache] dogpile: registering a new region cache_perms[{'async_creation_runner': None, 'name': 'cache_perms', 'function_key_generator': <function wrapper at 0x7fbe2f4678c0>, 'region_invalidator': <dogpile.cache.region.DefaultInvalidationStrategy object at 0x7fbe2f4542d0>, '_actual_backend': <rhodecode.lib.rc_cache.backends.RedisPickleBackend object at 0x7fbe2f454f10>, 'function_multi_key_generator': <function function_multi_key_generator at 0x7fbe39988de8>, '_lock_registry': <dogpile.util.nameregistry.NameRegistry object at 0x7fbe3a788c50>, 'key_mangler': None, 'expiration_time': 300, '_user_defined_key_mangler': None, 'backend': <rhodecode.lib.rc_cache.backends.RedisPickleBackend object at 0x7fbe2f454f10>}] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.971 [71611] DEBUG [rhodecode.lib.rc_cache] dogpile: registering a new region cache_repo_longterm[{'async_creation_runner': None, 'name': 'cache_repo_longterm', 'function_key_generator': <function wrapper at 0x7fbe2f46e6e0>, 'region_invalidator': <dogpile.cache.region.DefaultInvalidationStrategy object at 0x7fbe3a788d50>, '_actual_backend': <rhodecode.lib.rc_cache.backends.LRUMemoryBackend object at 0x7fbe3a788e50>, 'function_multi_key_generator': <function function_multi_key_generator at 0x7fbe39988de8>, '_lock_registry': <dogpile.util.nameregistry.NameRegistry object at 0x7fbe2f470110>, 'key_mangler': None, 'expiration_time': 2592000, '_user_defined_key_mangler': None, 'backend': <rhodecode.lib.rc_cache.backends.LRUMemoryBackend object at 0x7fbe3a788e50>}] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.972 [71611] DEBUG [rhodecode.lib.rc_cache] dogpile: registering a new region sql_cache_short[{'async_creation_runner': None, 'name': 'sql_cache_short', 'function_key_generator': <function wrapper at 0x7fbe2f46e7d0>, 'region_invalidator': <dogpile.cache.region.DefaultInvalidationStrategy object at 0x7fbe2f4701d0>, '_actual_backend': <rhodecode.lib.rc_cache.backends.LRUMemoryBackend object at 0x7fbe2f470210>, 'function_multi_key_generator': <function function_multi_key_generator at 0x7fbe39988de8>, '_lock_registry': <dogpile.util.nameregistry.NameRegistry object at 0x7fbe2f4702d0>, 'key_mangler': None, 'expiration_time': 30, '_user_defined_key_mangler': None, 'backend': <rhodecode.lib.rc_cache.backends.LRUMemoryBackend object at 0x7fbe2f470210>}] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.972 [71611] DEBUG [rhodecode.lib.rc_cache] dogpile: registering a new region cache_license[{'async_creation_runner': None, 'name': 'cache_license', 'function_key_generator': <function wrapper at 0x7fbe2f46e938>, 'region_invalidator': <dogpile.cache.region.DefaultInvalidationStrategy object at 0x7fbe2f470350>, '_actual_backend': <class 'rhodecode.lib.rc_cache.backends.FileNamespaceBackend'> `/home/rhodecode/.rccontrol/community-1/data/rc_cache_3`, 'function_multi_key_generator': <function function_multi_key_generator at 0x7fbe39988de8>, '_lock_registry': <dogpile.util.nameregistry.NameRegistry object at 0x7fbe2f470490>, 'key_mangler': None, 'expiration_time': 300, '_user_defined_key_mangler': None, 'backend': <class 'rhodecode.lib.rc_cache.backends.FileNamespaceBackend'> `/home/rhodecode/.rccontrol/community-1/data/rc_cache_3`}] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:19.973 [71611] DEBUG [rhodecode.lib.rc_cache] dogpile: registering a new region cache_repo[{'async_creation_runner': None, 'name': 'cache_repo', 'function_key_generator': <function wrapper at 0x7fbe2f46ea28>, 'region_invalidator': <dogpile.cache.region.DefaultInvalidationStrategy object at 0x7fbe2f470510>, '_actual_backend': <rhodecode.lib.rc_cache.backends.RedisPickleBackend object at 0x7fbe2f4705d0>, 'function_multi_key_generator': <function function_multi_key_generator at 0x7fbe39988de8>, '_lock_registry': <dogpile.util.nameregistry.NameRegistry object at 0x7fbe2f470550>, 'key_mangler': None, 'expiration_time': 2592000, '_user_defined_key_mangler': None, 'backend': <rhodecode.lib.rc_cache.backends.RedisPickleBackend object at 0x7fbe2f4705d0>}] | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:20.145 [71611] INFO  [celery.rhodecode.loader] Configuring celery based on `/home/rhodecode/.rccontrol/community-1/rhodecode.ini` file | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:20.151 [71611] DEBUG [celery.rhodecode.loader] Got custom celery conf: {u'task_always_eager': False, u'broker_url': u'redis://localhost:6379/8', u'max_tasks_per_child': 100} | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:20.151 [71611] INFO  [rhodecode.config.middleware] Pyramid app `pyramid_app_with_cleanup` created and configured in 0.25s | req_id:00000000-0000-0000-0000-000000000000
2020-03-31 09:55:20.156 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends] Mode: `auto` User: `mauldinl:5` Shell: `False` SSH Command: `"svnserve -t"` SCM_DETECTED: `svn` SCM Mode: `auto` SCM Repo: `None` | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.379 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends] Update key id:`2` fingerprint:`MD5:9e:12:51:5d:00:36:87:79:56:0f:6e:c0:52:1a:0b:8e` access time | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.379 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends] SSH Connection info {'client_port': '50004', 'client_ip': '138.254.18.106', 'server_ip': '138.254.135.35', 'server_port': '22'} | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.381 [71611] DEBUG [rhodecode.lib.auth] AuthUser: starting data propagation for new potential user | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.384 [71611] DEBUG [rhodecode.lib.auth] Trying Auth User lookup by USER ID: `5` | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.384 [71611] DEBUG [rhodecode.model.user] AuthUser: fill data execution based on: user_id:5 api_key:None username:None | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.385 [71611] DEBUG [rhodecode.model.user] AuthUser: filling found user:<User('id:5:mauldinl')> data | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.391 [71611] DEBUG [rhodecode.lib.auth] AuthUser: propagated user is now <AuthUser('id:5[mauldinl] ip:None auth:False')> | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.391 [71611] DEBUG [rhodecode.lib.auth] Computing PERMISSION tree for user <AuthUser('id:5[mauldinl] ip:None auth:False')> scope `None` with caching: True[TTL: 300s] | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.395 [71611] DEBUG [rhodecode.lib.auth] PERMISSION tree for user <AuthUser('id:5[mauldinl] ip:None auth:False')> computed in 0.0035s: [('repositories', 545), ('repositories_groups', 18), ('global', 2), ('repository_branches', 0), ('user_groups', 5)] | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.406 [71611] DEBUG [rhodecode.lib.auth] Computing PERMISSION tree for user <AuthUser('id:5[mauldinl] ip:None auth:False')> scope `OrderedDict([('repo_id', -1), ('user_group_id', -1), ('repo_group_id', -1), ('repo_name', None)])` with caching: True[TTL: 300s] | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.407 [71611] DEBUG [rhodecode.lib.auth] PERMISSION tree for user <AuthUser('id:5[mauldinl] ip:None auth:False')> computed in 0.0003s: [('repositories', 0), ('global', 2), ('repository_branches', 0), ('repositories_groups', 0), ('user_groups', 0)] | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.409 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends] VCS detected:`svn` mode: `auto` repo_name: None, branch_permission_checks:False | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.409 [71611] DEBUG [rhodecode.lib.hooks_daemon] Preparing HTTP callback daemon at `127.0.0.1:37319` and registering hook object | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.409 [71611] DEBUG [rhodecode.lib.hooks_daemon] Prepared a callback daemon: HttpHooksCallbackDaemon at url `127.0.0.1:37319` | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.409 [71611] DEBUG [rhodecode.lib.hooks_daemon] Running `HttpHooksCallbackDaemon` callback daemon | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.409 [71611] DEBUG [rhodecode.lib.hooks_daemon] Running event loop of callback daemon in background thread | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.410 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends.svn] Using svn binaries from path ~/.rccontrol/vcsserver-1/profile/bin/svnserve | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.410 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends.svn] Final CMD: ~/.rccontrol/vcsserver-1/profile/bin/svnserve -t --config-file /tmp/tmpSpzroh -r /srv/rhodecode/repos/ | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
svnserve: warning: cannot set LC_CTYPE locale
svnserve: warning: environment variable LANG is en_US.UTF-8
svnserve: warning: please check that your locale name is correct
2020-03-31 09:55:20.605 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends.svn] Extracting repository name from subdir path playground/teststructure/trunk/foo | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.606 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends.svn] Found prefix playground/teststructure/ match, returning proper repository name | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.606 [71611] DEBUG [rhodecode.apps.ssh_support.lib.backends.base] permission for <User('id:5:mauldinl')> on playground/teststructure are: repository.admin | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
2020-03-31 09:55:20.606 [71611] INFO  [rhodecode.apps.ssh_support.lib.backends.base] READ Permissions for User "<User('id:5:mauldinl')>" detected to repo "playground/teststructure"! | req_id:19beac90-52d8-4d06-8981-7bcfa54e68e6
Sending        trunk/foo/test_b.sql
Transmitting file data .done
Committing transaction...
Committed revision 19.

See the svn log output:

svn log -l 3
svnserve: warning: cannot set LC_CTYPE locale
svnserve: warning: environment variable LANG is en_US.UTF-8
svnserve: warning: please check that your locale name is correct
------------------------------------------------------------------------
r17 | rhodecode | 2020-03-31 09:01:50 -0500 (Tue, 31 Mar 2020) | 1 line

Move file
------------------------------------------------------------------------
r16 | mauldinl | 2020-03-19 09:42:40 -0500 (Thu, 19 Mar 2020) | 1 line

Moving file
------------------------------------------------------------------------
r15 | mauldinl | 2020-03-19 09:39:38 -0500 (Thu, 19 Mar 2020) | 1 line

Revision 17 was commited via svn+ssh (incorrect author), but revisions 15 and 16 were commited via svn+https (which has the correct author).

Rhodecode version: 4.18.2

History

#1 Updated by Luke Mauldin 4 months ago

More info from svn info:

❰mauldinl❙/tmp/teststructure_ssh❱✔≻ svn info
Path: .
Working Copy Root Path: /tmp/teststructure_ssh
URL: svn+ssh://rhodecode@XXXXX/playground/teststructure
Relative URL: ^/
Repository Root: svn+ssh://rhodecode@XXXX/playground/teststructure
Repository UUID: 18439e7a-69e5-11ea-987f-8169f03316d2
Revision: 17
Node Kind: directory
Schedule: normal
Last Changed Author: rhodecode
Last Changed Rev: 17
Last Changed Date: 2020-03-31 09:01:50 -0500 (Tue, 31 Mar 2020)

#2 Updated by Marcin Kuzminski [CTO] 4 months ago

  • Priority changed from Normal to High
  • Assignee set to Daniel D

#3 Updated by Redmine Integration 4 months ago

  • Status changed from New to Resolved

#4 Updated by Luke Mauldin 4 months ago

That worked. Thank you!

Also available in: Atom PDF