From 0d9e2c4515edca5f219dbb9557920b23b21ea1b2 Mon Sep 17 00:00:00 2001 From: fengzero Date: Fri, 15 Jul 2022 01:48:16 +0000 Subject: [PATCH] Revert "change default password" This reverts commit b16df3d3d3e9d67dcdff2132d650fcd574d516c2. --- ft/normal_test.robot | 4 ++-- ft/resource/api.resource | 2 +- plugins/restful/normal_handle.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ft/normal_test.robot b/ft/normal_test.robot index e7c90d9c..df1239ae 100644 --- a/ft/normal_test.robot +++ b/ft/normal_test.robot @@ -7,11 +7,11 @@ Suite Teardown Stop Neuronx *** Test Cases *** login with invalid username and password, it should return failure - POST /api/v2/login {"name":"admin1", "pass": "Lrlq6si6%GUvok$B"} + POST /api/v2/login {"name":"admin1", "pass": "0000"} Integer response status 401 Integer $.error ${NEU_ERR_INVALID_USER_OR_PASSWORD} login with username and password, it should return success - POST /api/v2/login {"name":"admin", "pass": "Lrlq6si6%GUvok$B"} + POST /api/v2/login {"name":"admin", "pass": "0000"} Integer response status 200 output $.token diff --git a/ft/resource/api.resource b/ft/resource/api.resource index 0d344df5..b762a3e7 100644 --- a/ft/resource/api.resource +++ b/ft/resource/api.resource @@ -53,7 +53,7 @@ Check Response Status Integer response status ${status} LOGIN - POST /api/v2/login {"name": "admin", "pass":"Lrlq6si6%GUvok$B"} + POST /api/v2/login {"name": "admin", "pass":"0000"} Integer response status 200 diff --git a/plugins/restful/normal_handle.c b/plugins/restful/normal_handle.c index e783ccda..4a2b8b1f 100644 --- a/plugins/restful/normal_handle.c +++ b/plugins/restful/normal_handle.c @@ -50,7 +50,7 @@ void handle_login(nng_aio *aio) aio, neu_json_login_req_t, neu_json_decode_login_req, { neu_json_login_resp_t login_resp = { 0 }; char * name = "admin"; - char * password = "Lrlq6si6%GUvok$B"; + char * password = "0000"; if (strcmp(req->name, name) == 0 && strcmp(req->pass, password) == 0) {