From 2ee6315bb8f8ca683fdd8ad72edebe6579f53fba Mon Sep 17 00:00:00 2001 From: PrajwalM2212 Date: Sat, 20 Feb 2021 13:09:10 -0800 Subject: [PATCH] Changes --- monkey/monkey_island/cc/resources/auth/auth.py | 2 +- monkey/monkey_island/cc/ui/src/services/AuthService.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/resources/auth/auth.py b/monkey/monkey_island/cc/resources/auth/auth.py index 597c73d60..43cbf3b0e 100644 --- a/monkey/monkey_island/cc/resources/auth/auth.py +++ b/monkey/monkey_island/cc/resources/auth/auth.py @@ -34,7 +34,7 @@ class Authenticate(flask_restful.Resource): @staticmethod def _authenticate(username, secret): user = user_store.UserStore.username_table.get(username, None) - if user and safe_str_cmp(user.secret, secret): + if user and safe_str_cmp(user.secret.encode('utf-8'), secret.encode('utf-8')): return user def post(self): diff --git a/monkey/monkey_island/cc/ui/src/services/AuthService.js b/monkey/monkey_island/cc/ui/src/services/AuthService.js index 27a8100bd..7a99ba819 100644 --- a/monkey/monkey_island/cc/ui/src/services/AuthService.js +++ b/monkey/monkey_island/cc/ui/src/services/AuthService.js @@ -2,7 +2,7 @@ import {SHA3} from 'sha3'; import decode from 'jwt-decode'; export default class AuthService { - NO_AUTH_CREDS = 'loginwithoutpassword'; + NO_AUTH_CREDS = '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()'; SECONDS_BEFORE_JWT_EXPIRES = 20; AUTHENTICATION_API_ENDPOINT = '/api/auth';