From 44b2e83fe0f030058c9bff7a752e7596747209c5 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 5 Oct 2007 19:29:23 +0000 Subject: [PATCH] Added missing check to see if a user is allowed to post or reply a message --- ChangeLog | 4 ++++ TODO | 2 -- mbsebbs/mail.c | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 498af06f..86c25ca5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ $Id$ v0.91.12 24-Sep-2007 + mbsebbs: + Added missing check to see if a user is allowed to post or + reply a message. + v0.91.11 02-Sep-2007 - 24-Sep-2007 diff --git a/TODO b/TODO index c6cd8a7f..058ae42d 100644 --- a/TODO +++ b/TODO @@ -34,8 +34,6 @@ everything: limitations. A php API should be added too. mbsebbs: - U: Users can post messages while there level is too low. - W: OLR, implement file requests. N: Only count posted messages in local mail areas. diff --git a/mbsebbs/mail.c b/mbsebbs/mail.c index fe22411e..5c1df136 100644 --- a/mbsebbs/mail.c +++ b/mbsebbs/mail.c @@ -133,8 +133,18 @@ int Post_Allowed(void); int Post_Allowed(void) { if (msgs.MsgKinds == RONLY) { - /* Message area is Readonly */ + Enter(2); + /* Posting not allowed, this area is Read Only! */ pout(LIGHTRED, BLACK, (char *) Language(437)); + Enter(1); + sleep(3); + return FALSE; + } + if (Access(exitinfo.Security, msgs.WRSec) == FALSE) { + Enter(2); + /* No Write access to area */ + pout(LIGHTRED, BLACK, (char *) Language(453)); + Enter(1); sleep(3); return FALSE; }