From d9d0c886f8a10589ab8c547f89cc90f236242d66 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 5 Jul 2019 10:58:58 +0100 Subject: [PATCH] Check that account exists --- epicyon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/epicyon.py b/epicyon.py index 89ed52f7..18e918c6 100644 --- a/epicyon.py +++ b/epicyon.py @@ -223,6 +223,9 @@ if args.changepassword: if len(newPassword)<8: print('Password should be at least 8 characters') sys.exit() + if not os.path.isdir(baseDir+'/accounts/'+nickname+'@'+domain): + print('Account '+nickname+'@'+domain+' not found') + sys.exit() passwordFile=baseDir+'/accounts/passwords' if os.path.isfile(passwordFile): if nickname+':' in open(passwordFile).read():