mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-12-26 05:52:36 +00:00
Compare commits
2 Commits
v5
...
pr@v5@perf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80b1d61902 | ||
|
|
916dc5578a |
@@ -1,4 +1,4 @@
|
|||||||
FROM jumpserver/core-base:20251128_025056 AS stage-build
|
FROM jumpserver/core-base:20251225_092635 AS stage-build
|
||||||
|
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from urllib.parse import urlparse
|
|||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.exceptions import SuspiciousOperation
|
from django.core.exceptions import SuspiciousOperation
|
||||||
from django.utils.encoding import force_bytes, smart_bytes
|
from django.utils.encoding import force_bytes
|
||||||
from jwkest import JWKESTException
|
from jwkest import JWKESTException
|
||||||
from jwkest.jwk import KEYS
|
from jwkest.jwk import KEYS
|
||||||
from jwkest.jws import JWS
|
from jwkest.jws import JWS
|
||||||
@@ -58,7 +58,7 @@ def _get_jwks_keys(shared_key):
|
|||||||
# Adds the shared key (which can correspond to the client_secret) as an oct key so it can be
|
# Adds the shared key (which can correspond to the client_secret) as an oct key so it can be
|
||||||
# used for HMAC signatures.
|
# used for HMAC signatures.
|
||||||
logger.debug(log_prompt.format('Add key'))
|
logger.debug(log_prompt.format('Add key'))
|
||||||
jwks_keys.add({'key': smart_bytes(shared_key), 'kty': 'oct'})
|
jwks_keys.add({'key': force_bytes(shared_key), 'kty': 'oct'})
|
||||||
logger.debug(log_prompt.format('End'))
|
logger.debug(log_prompt.format('End'))
|
||||||
return jwks_keys
|
return jwks_keys
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ is_available:
|
|||||||
sample: true
|
sample: true
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import telnetlib
|
import telnetlib3
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
||||||
@@ -57,9 +57,9 @@ def main():
|
|||||||
port = module.params['login_port']
|
port = module.params['login_port']
|
||||||
timeout = module.params['timeout']
|
timeout = module.params['timeout']
|
||||||
try:
|
try:
|
||||||
client = telnetlib.Telnet(host, port, timeout=timeout)
|
client = telnetlib3.Telnet(host, port, timeout=timeout)
|
||||||
client.close()
|
client.close()
|
||||||
except Exception as err: # noqa
|
except Exception as err: # noqa
|
||||||
result['is_available'] = False
|
result['is_available'] = False
|
||||||
module.fail_json(msg='Unable to connect to asset: %s' % err)
|
module.fail_json(msg='Unable to connect to asset: %s' % err)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
#
|
#
|
||||||
import asyncio
|
import asyncio
|
||||||
import socket
|
import socket
|
||||||
import telnetlib
|
|
||||||
|
import telnetlib3
|
||||||
|
|
||||||
from settings.utils import generate_ips
|
from settings.utils import generate_ips
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ PROMPT_REGEX = r'[\<|\[](.*)[\>|\]]'
|
|||||||
async def telnet(dest_addr, port_number=23, timeout=10):
|
async def telnet(dest_addr, port_number=23, timeout=10):
|
||||||
loop = asyncio.get_running_loop()
|
loop = asyncio.get_running_loop()
|
||||||
try:
|
try:
|
||||||
connection = await loop.run_in_executor(None, telnetlib.Telnet, dest_addr, port_number, timeout)
|
connection = await loop.run_in_executor(None, telnetlib3.Telnet, dest_addr, port_number, timeout)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
return False, 'Timeout'
|
return False, 'Timeout'
|
||||||
except (ConnectionRefusedError, socket.timeout, socket.gaierror) as e:
|
except (ConnectionRefusedError, socket.timeout, socket.gaierror) as e:
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ dependencies = [
|
|||||||
'pyyaml==6.0.1',
|
'pyyaml==6.0.1',
|
||||||
'requests==2.32.4',
|
'requests==2.32.4',
|
||||||
'simplejson==3.19.1',
|
'simplejson==3.19.1',
|
||||||
'six==1.16.0',
|
'six==1.17.0',
|
||||||
'sshtunnel==0.4.0',
|
'sshtunnel==0.4.0',
|
||||||
'sshpubkeys==3.3.1',
|
'sshpubkeys==3.3.1',
|
||||||
'uritemplate==4.1.1',
|
'uritemplate==4.1.1',
|
||||||
'vine==5.0.0',
|
'vine==5.1.0',
|
||||||
'werkzeug==3.0.6',
|
'werkzeug==3.0.6',
|
||||||
'unicodecsv==0.14.1',
|
'unicodecsv==0.14.1',
|
||||||
'httpsig==1.3.0',
|
'httpsig==1.3.0',
|
||||||
@@ -68,32 +68,32 @@ dependencies = [
|
|||||||
'ipip-ipdb==1.6.1',
|
'ipip-ipdb==1.6.1',
|
||||||
'pywinrm==0.4.3',
|
'pywinrm==0.4.3',
|
||||||
'python-nmap==0.7.1',
|
'python-nmap==0.7.1',
|
||||||
'django==4.1.13',
|
'django==5.2.9',
|
||||||
'django-bootstrap3==23.4',
|
'django-bootstrap3==23.4',
|
||||||
'django-filter==23.2',
|
'django-filter==24.3',
|
||||||
'django-formtools==2.5.1',
|
'django-formtools==2.5.1',
|
||||||
'django-ranged-response==0.2.0',
|
'django-ranged-response==0.2.0',
|
||||||
'django-simple-captcha==0.5.18',
|
'django-simple-captcha==0.5.18',
|
||||||
'django-timezone-field==5.1',
|
'django-timezone-field==7.1',
|
||||||
'djangorestframework==3.14.0',
|
'djangorestframework==3.15.0',
|
||||||
'djangorestframework-bulk==0.2.1',
|
'djangorestframework-bulk==0.2.1',
|
||||||
'django-simple-history==3.6.0',
|
'django-simple-history==3.6.0',
|
||||||
'django-private-storage==3.1',
|
'django-private-storage==3.1.3',
|
||||||
'drf-nested-routers==0.93.4',
|
'drf-nested-routers==0.93.4',
|
||||||
'drf-writable-nested==0.7.0',
|
'drf-writable-nested==0.7.0',
|
||||||
'rest-condition==1.0.3',
|
'rest-condition==1.0.3',
|
||||||
'drf-spectacular==0.28.0',
|
'drf-spectacular==0.29.0',
|
||||||
'pillow==10.2.0',
|
'pillow==12.0.0',
|
||||||
'pytz==2025.2',
|
'pytz==2025.2',
|
||||||
'django-proxy==1.2.2',
|
'django-proxy==1.2.2',
|
||||||
'python-daemon==3.0.1',
|
'python-daemon==3.0.1',
|
||||||
'eventlet==0.40.3',
|
'eventlet==0.40.3',
|
||||||
'greenlet==3.2.4',
|
'greenlet==3.2.4',
|
||||||
'gunicorn==23.0.0',
|
'gunicorn==23.0.0',
|
||||||
'celery==5.3.1',
|
'celery==5.6.0',
|
||||||
'flower==2.0.1',
|
'flower==2.0.1',
|
||||||
'django-celery-beat==2.6.0',
|
'django-celery-beat==2.8.1',
|
||||||
'kombu==5.3.5',
|
'kombu==5.6.0',
|
||||||
'uvicorn==0.22.0',
|
'uvicorn==0.22.0',
|
||||||
'websockets==11.0.3',
|
'websockets==11.0.3',
|
||||||
'python-ldap==3.4.5',
|
'python-ldap==3.4.5',
|
||||||
@@ -103,10 +103,10 @@ dependencies = [
|
|||||||
'python-cas==1.6.0',
|
'python-cas==1.6.0',
|
||||||
'django-auth-ldap==4.4.0',
|
'django-auth-ldap==4.4.0',
|
||||||
'mysqlclient==2.2.4',
|
'mysqlclient==2.2.4',
|
||||||
'pymssql==2.3.4',
|
'pymssql==2.3.10',
|
||||||
'django-redis==5.3.0',
|
'django-redis==5.4.0',
|
||||||
'python-redis-lock==4.0.0',
|
'python-redis-lock==4.0.0',
|
||||||
'pyopenssl==23.2.0',
|
'pyopenssl==24.0.0',
|
||||||
'redis',
|
'redis',
|
||||||
'pymongo==4.6.3',
|
'pymongo==4.6.3',
|
||||||
'pyfreerdp==0.0.2',
|
'pyfreerdp==0.0.2',
|
||||||
@@ -153,6 +153,7 @@ dependencies = [
|
|||||||
'pdf2image==1.17.0',
|
'pdf2image==1.17.0',
|
||||||
'drf-spectacular-sidecar==2025.8.1',
|
'drf-spectacular-sidecar==2025.8.1',
|
||||||
"django-oauth-toolkit==2.4.0",
|
"django-oauth-toolkit==2.4.0",
|
||||||
|
"telnetlib3==2.0.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
|
|||||||
Reference in New Issue
Block a user