Skip to content
Snippets Groups Projects
Commit 2f39248b authored by rswindell's avatar rswindell
Browse files

Fix bug reported by Xucaen (sort-of):

Check the user's 'M' restriction before allowing them to send netmail and throw
an error if they're not allowed.
The actual bug reported was that the global setting in SCFG->Networks->Internet
->Allow Sending of E-Mail wasn't being followed in the old/legacy Web GUI,
and that's still the case because the scfg_t.inetmail_misc value isn't
(currently) exposed via JavaScript even though the bit-flag values (NMAIL_*)
are defined in sbbsdefs.js - whoops, just an oversight.
parent b667e727
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,11 @@ if(sub!='mail') {
}
else {
hdrs.to_net_type=netaddr_type(http_request.query.to);
if(hdrs.to_net_type!=NET_NONE)
if(hdrs.to_net_type!=NET_NONE) {
if(user.security.restrictions&UFLAG_M)
error("You do not have permission to send netmail");
hdrs.to_net_addr=http_request.query.to;
else {
} else {
var usr=system.matchuser(http_request.query.to);
if(usr!=0)
hdrs.to_ext=usr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment