0.12.4 fix login token

This commit is contained in:
wh1te909
2022-04-12 16:49:00 +00:00
parent f82b589d03
commit 5e20a5cd71
4 changed files with 5 additions and 5 deletions

View File

@@ -519,7 +519,7 @@ class TestAgentViews(TacticalTestCase):
self.check_not_authenticated("post", url)
@patch("meshctrl.utils.get_auth_token")
@patch("meshctrl.utils.get_login_token")
def test_meshcentral_tabs(self, mock_token):
url = f"{base_url}/{self.agent.agent_id}/meshcentral/"
mock_token.return_value = "askjh1k238uasdhk487234jadhsajksdhasd"

View File

@@ -4,7 +4,7 @@ import os
import random
import string
import time
from meshctrl.utils import get_auth_token
from meshctrl.utils import get_login_token
from core.models import CodeSignToken, CoreSettings
from core.utils import get_mesh_ws_url, remove_mesh_agent, send_command_with_mesh
@@ -209,7 +209,7 @@ class AgentMeshCentral(APIView):
agent = get_object_or_404(Agent, agent_id=agent_id)
core = CoreSettings.objects.first()
token = get_auth_token(user=core.mesh_username, key=core.mesh_token)
token = get_login_token(key=core.mesh_token, user=f"user//{core.mesh_username}")
control = f"{core.mesh_site}/?login={token}&gotonode={agent.mesh_node_id}&viewmode=11&hide=31" # type:ignore
terminal = f"{core.mesh_site}/?login={token}&gotonode={agent.mesh_node_id}&viewmode=12&hide=31" # type:ignore

View File

@@ -34,4 +34,4 @@ vine==5.0.0
websockets==10.2
zipp==3.8.0
drf_spectacular==0.21.2
meshctrl==0.1.13
meshctrl==0.1.15

View File

@@ -17,7 +17,7 @@ LINUX_AGENT_SCRIPT = BASE_DIR / "core" / "agent_linux.sh"
AUTH_USER_MODEL = "accounts.User"
# latest release
TRMM_VERSION = "0.12.3"
TRMM_VERSION = "0.12.4"
# bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser