aboutsummaryrefslogtreecommitdiff
path: root/captain/captain.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2022-04-29 11:13:13 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2022-04-29 11:13:13 -0400
commit8c401f9748069eb052f5ac4f2eee1761b1f67afd (patch)
tree71c4cc2a585460b791a672a3a53b8e51e7b3e598 /captain/captain.f90
parentb558fd94527e6a3f359c3ca766eeabaf0c7a8a57 (diff)
downloadlevitating-8c401f9748069eb052f5ac4f2eee1761b1f67afd.tar.gz
levitating-8c401f9748069eb052f5ac4f2eee1761b1f67afd.zip
Fixed login to use the proper password checking function.
Diffstat (limited to 'captain/captain.f90')
-rw-r--r--captain/captain.f9025
1 files changed, 25 insertions, 0 deletions
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