mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
mod_auth.cpp: fix no_auth_client handling
change find() to compare()
Origin commit data
------------------
Commit: 7f72fa6f3d
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-12-14 (Sat, 14 Dec 2013)
Origin message was:
------------------
- mod_auth.cpp: fix no_auth_client handling
change find() to compare()
This commit is contained in:
@@ -14,10 +14,10 @@
|
|||||||
THandleStatus CmAuth::Hook_PrepareResponse(CyhookHandler *hh) {
|
THandleStatus CmAuth::Hook_PrepareResponse(CyhookHandler *hh) {
|
||||||
THandleStatus status = HANDLED_CONTINUE;
|
THandleStatus status = HANDLED_CONTINUE;
|
||||||
|
|
||||||
|
// dont check local calls or calls from NoAuthClient
|
||||||
if (authenticate) {
|
if (authenticate) {
|
||||||
if ((hh->UrlData["clientaddr"]).find(IADDR_LOCAL) > 0
|
if ((hh->UrlData["clientaddr"]).find(IADDR_LOCAL) > 0
|
||||||
&& (no_auth_client == "" || (hh->UrlData["clientaddr"]).find(
|
&& (no_auth_client == "" || (hh->UrlData["clientaddr"]).compare(no_auth_client) != 0))
|
||||||
no_auth_client) > 0)) // dont check local calls or calls from NoAuthClient
|
|
||||||
{
|
{
|
||||||
if (!CheckAuth(hh)) {
|
if (!CheckAuth(hh)) {
|
||||||
hh->SetError(HTTP_UNAUTHORIZED);
|
hh->SetError(HTTP_UNAUTHORIZED);
|
||||||
|
Reference in New Issue
Block a user