mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-16 01:43:35 +02:00
use empty to check string
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2b5e7b5ba3
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-01-09 (Fri, 09 Jan 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -17,7 +17,7 @@ THandleStatus CmAuth::Hook_PrepareResponse(CyhookHandler *hh) {
|
||||
// dont check local calls or calls from NoAuthClient
|
||||
if (authenticate) {
|
||||
if ((hh->UrlData["clientaddr"]).find(IADDR_LOCAL) > 0
|
||||
&& (no_auth_client == "" || (hh->UrlData["clientaddr"]).compare(no_auth_client) != 0))
|
||||
&& (no_auth_client.empty() || (hh->UrlData["clientaddr"]).compare(no_auth_client) != 0))
|
||||
{
|
||||
if (!CheckAuth(hh)) {
|
||||
hh->SetError(HTTP_UNAUTHORIZED);
|
||||
@@ -50,7 +50,7 @@ THandleStatus CmAuth::Hook_ReadConfig(CConfigFile *Config,
|
||||
// check if given username an pssword are valid
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CmAuth::CheckAuth(CyhookHandler *hh) {
|
||||
if (hh->HeaderList["Authorization"] == "")
|
||||
if (hh->HeaderList["Authorization"].empty())
|
||||
return false;
|
||||
std::string encodet = hh->HeaderList["Authorization"].substr(6,
|
||||
hh->HeaderList["Authorization"].length() - 6);
|
||||
|
Reference in New Issue
Block a user