1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

- Add patch to fix null pointer dereferences in webadmin module

Reported by:	    Albert Kult (via email)
Obtained from:	    2bd410ee55
Security:	    19751e06-c798-11e2-a373-000c29833058
This commit is contained in:
Jase Thew 2013-05-28 14:21:35 +00:00
parent 7ae9607313
commit 3b928a9984
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319313
2 changed files with 39 additions and 0 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= znc
PORTVERSION= 1.0
PORTREVISION= 1
CATEGORIES= irc ipv6
MASTER_SITES= http://znc.in/releases/

View File

@ -0,0 +1,38 @@
--- modules/webadmin.cpp.orig 2012-11-06 16:02:20.000000000 +0000
+++ modules/webadmin.cpp 2013-05-28 12:43:53.258581961 +0100
@@ -404,7 +404,7 @@
CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
// Admin||Self Check
- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
+ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
return false;
}
@@ -433,7 +433,7 @@
CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
// Admin||Self Check
- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
+ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
return false;
}
@@ -457,7 +457,7 @@
CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
// Admin||Self Check
- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
+ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
return false;
}
@@ -471,7 +471,7 @@
CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
// Admin||Self Check
- if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
+ if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
return false;
}