Permalink
Browse files

Fix BindHost in SetNetwork in *controlpanel to check permissions

(cherry picked from commit 530bbb5)
  • Loading branch information...
1 parent 9d52096 commit b7e5525f70e7d9c0bd08921268b0366785a9ea61 @Nothing4You Nothing4You committed with DarthGandalf Mar 17, 2014
Showing with 6 additions and 2 deletions.
  1. +6 −2 modules/controlpanel.cpp
@@ -464,8 +464,12 @@ class CAdminMod : public CModule {
pNetwork->SetRealName(sValue);
PutModule("RealName = " + pNetwork->GetRealName());
} else if (sVar.Equals("bindhost")) {
- pNetwork->SetBindHost(sValue);
- PutModule("BindHost = " + pNetwork->GetBindHost());
+ if(!pUser->DenySetBindHost() || m_pUser->IsAdmin()) {
+ pNetwork->SetBindHost(sValue);
+ PutModule("BindHost = " + sValue);
+ } else {
+ PutModule("Access denied!");
+ }
} else if (sVar.Equals("floodrate")) {
pNetwork->SetFloodRate(sValue.ToDouble());
PutModule("FloodRate = " + CString(pNetwork->GetFloodRate()));

0 comments on commit b7e5525

Please sign in to comment.