Permalink
Browse files

Fix BindHost in SetNetwork in *controlpanel to check permissions

  • Loading branch information...
1 parent 1925737 commit 530bbb5b0d92175a56b84705769ad617ced7a126 @Nothing4You Nothing4You committed Mar 17, 2014
Showing with 6 additions and 2 deletions.
  1. +6 −2 modules/controlpanel.cpp
@@ -478,8 +478,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 530bbb5

Please sign in to comment.