From 8c401f9748069eb052f5ac4f2eee1761b1f67afd Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Fri, 29 Apr 2022 11:13:13 -0400 Subject: Fixed login to use the proper password checking function. --- captain/captain.f90 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'captain/captain.f90') diff --git a/captain/captain.f90 b/captain/captain.f90 index 46287d9..4d7b17f 100644 --- a/captain/captain.f90 +++ b/captain/captain.f90 @@ -123,6 +123,31 @@ contains Print *, "Unverify: "//trim(option)//"X", verify_hash(trim(option)//"X", tmp) stop + ! This option shouldn't be public, and it just verifies passwords + else if(trim(option) == "--verify") then + + if(config_loaded) then + call initialize_db(database_filename) + i = i + 1 + call get_command_argument(i, username) + + i = i + 1 + call get_command_argument(i, password) + + if(validate_user_db(trim(username), trim(password))) then + Print *, "Password accepted!" + else + Print *, "REJECTED" + end if + + else + + Print *, "Please specify the configuration file first" + + end if + + stop + ! This option also shouldn't be public, and it verifies that ! uuids can be generated else if(trim(option) == "--uuid") then -- cgit v1.2.3