}
if (with_template) {
+ unbuffer_output();
cprintf("%d Send template then receive message list\n",
START_CHAT_MODE);
template = (struct CtdlMessage *)
}
}
}
+ buffer_output();
}
else {
cprintf("%d Message list...\n", LISTING_FOLLOWS);
return(om_not_logged_in);
}
- /* FIXME ... small security issue
- * We need to check to make sure the requested message is actually
- * in the current room, and set msg_ok to 1 only if it is. This
- * functionality is currently missing because I'm in a hurry to replace
- * broken production code with nonbroken pre-beta code. :( -- ajc
- *
- if (!msg_ok) {
- if (do_proto) cprintf("%d Message %ld is not in this room.\n",
- ERROR + MESSAGE_NOT_FOUND, msg_num);
- return(om_no_such_msg);
- }
- */
+ /* FIXME: check message id against msglist for this room */
/*
* Fetch the message from disk. If we're in sooper-fast headers
retval = 0L;
} else {
if (is_bigmsg) {
- cdb_store(CDB_BIGMSGS, &newmsgid, sizeof(long),
- holdM, strlen(holdM) );
+ cdb_store(CDB_BIGMSGS,
+ &newmsgid,
+ sizeof(long),
+ holdM,
+ (strlen(holdM) + 1)
+ );
}
retval = newmsgid;
}
*/
int CtdlCheckInternetMailPermission(struct ctdluser *who) {
+ /* Do not allow twits to send Internet mail */
+ if (who->axlevel <= 2) return(0);
+
/* Globally enabled? */
if (config.c_restrict == 0) return(1);
struct recptypes *valid = NULL;
char subject[SIZ];
+ unbuffer_output();
+
post = extract_int(entargs, 0);
extract(recp, entargs, 1);
anon_flag = extract_int(entargs, 2);
if (getroom(&qrbuf, roomname) != 0) {
create_room(roomname,
( (is_mailbox != NULL) ? 5 : 3 ),
- "", 0, 1, 0);
+ "", 0, 1, 0, VIEW_BBS);
}
/* If the caller specified this object as unique, delete all
* other objects of this type that are currently in the room.