fix: fixed empty server url in PR link. Fixes: RCCE-77
This commit is contained in:
parent
4bd0fecc18
commit
9019f7e9c8
1 changed files with 7 additions and 1 deletions
|
|
@ -32,6 +32,8 @@ import logging
|
|||
import click
|
||||
|
||||
from rhodecode.config.config_maker import sanitize_settings_and_apply_defaults
|
||||
from rhodecode.lib.request import Request
|
||||
from rhodecode.lib.utils2 import AttributeDict
|
||||
from rhodecode.lib.statsd_client import StatsdClient
|
||||
from rhodecode.lib.config_utils import get_app_config_lightweight
|
||||
|
||||
|
|
@ -74,7 +76,11 @@ def main(ini_path, mode, user, user_id, key_id, shell, debug):
|
|||
|
||||
try:
|
||||
connection_info = os.environ.get('SSH_CONNECTION', '')
|
||||
env = {'RC_CMD_SSH_WRAPPER': '1'}
|
||||
request = Request.blank('/', base_url=settings['app.base_url'])
|
||||
request.user = AttributeDict({'username': user,
|
||||
'user_id': user_id,
|
||||
'ip_addr': connection_info.split(' ')[0] if connection_info else None})
|
||||
env = {'RC_CMD_SSH_WRAPPER': '1', 'request': request}
|
||||
ssh_wrapper = SshWrapperStandalone(
|
||||
command, connection_info, mode,
|
||||
user, user_id, key_id, shell, ini_path, settings, env)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue