From 81160dbbe9cf3778b6d9b47bec3c9df319dae223 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Thu, 16 May 2013 20:08:07 +0000 Subject: [PATCH] fixed: a passwd winix function should allow a non loged person to reset his password (permission fix) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@927 e52654a7-88a9-db11-a3e9-0013d4bc506e --- functions/passwd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/passwd.cpp b/functions/passwd.cpp index 5076349..778fb39 100755 --- a/functions/passwd.cpp +++ b/functions/passwd.cpp @@ -25,7 +25,8 @@ Passwd::Passwd() bool Passwd::HasAccess() { - return cur->session->puser != 0; + // a not logged user can use this function to reset his password + return true; } @@ -282,6 +283,9 @@ void Passwd::MakeGet() { if( cur->request->IsParam(L"resetpassword") ) ShowResetPasswordForm(); + else + if( !cur->session->puser ) + cur->request->status = WINIX_ERR_PERMISSION_DENIED; }