Skip to content

Commit

Permalink
[music] fix leaking credentials in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansaraev committed Dec 7, 2015
1 parent 26515da commit a836b03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions xbmc/BackgroundInfoLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "FileItem.h"
#include "threads/SingleLock.h"
#include "utils/log.h"
#include "URL.h"

CBackgroundInfoLoader::CBackgroundInfoLoader() : m_thread (NULL)
{
Expand Down Expand Up @@ -61,7 +62,7 @@ void CBackgroundInfoLoader::Run()
}
catch (...)
{
CLog::Log(LOGERROR, "CBackgroundInfoLoader::LoadItemCached - Unhandled exception for item %s", pItem->GetPath().c_str());
CLog::Log(LOGERROR, "CBackgroundInfoLoader::LoadItemCached - Unhandled exception for item %s", CURL::GetRedacted(pItem->GetPath()).c_str());
}
}

Expand All @@ -81,7 +82,7 @@ void CBackgroundInfoLoader::Run()
}
catch (...)
{
CLog::Log(LOGERROR, "CBackgroundInfoLoader::LoadItemLookup - Unhandled exception for item %s", pItem->GetPath().c_str());
CLog::Log(LOGERROR, "CBackgroundInfoLoader::LoadItemLookup - Unhandled exception for item %s", CURL::GetRedacted(pItem->GetPath()).c_str());
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions xbmc/music/infoscanner/MusicInfoScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ bool CMusicInfoScanner::DoScan(const std::string& strDirectory)
if ((m_flags & SCAN_RESCAN) || !m_musicDatabase.GetPathHash(strDirectory, dbHash) || dbHash != hash)
{ // path has changed - rescan
if (dbHash.empty())
CLog::Log(LOGDEBUG, "%s Scanning dir '%s' as not in the database", __FUNCTION__, strDirectory.c_str());
CLog::Log(LOGDEBUG, "%s Scanning dir '%s' as not in the database", __FUNCTION__, CURL::GetRedacted(strDirectory).c_str());
else
CLog::Log(LOGDEBUG, "%s Rescanning dir '%s' due to change", __FUNCTION__, strDirectory.c_str());
CLog::Log(LOGDEBUG, "%s Rescanning dir '%s' due to change", __FUNCTION__, CURL::GetRedacted(strDirectory).c_str());

// filter items in the sub dir (for .cue sheet support)
items.FilterCueItems();
Expand All @@ -479,7 +479,7 @@ bool CMusicInfoScanner::DoScan(const std::string& strDirectory)
}
else
{ // path is the same - no need to rescan
CLog::Log(LOGDEBUG, "%s Skipping dir '%s' due to no change", __FUNCTION__, strDirectory.c_str());
CLog::Log(LOGDEBUG, "%s Skipping dir '%s' due to no change", __FUNCTION__, CURL::GetRedacted(strDirectory).c_str());
m_currentItem += CountFiles(items, false); // false for non-recursive

// updated the dialog with our progress
Expand Down Expand Up @@ -1071,7 +1071,7 @@ INFO_RET CMusicInfoScanner::DownloadAlbumInfo(const CAlbum& album, const ADDON::
CNfoFile nfoReader;
if (XFILE::CFile::Exists(strNfo))
{
CLog::Log(LOGDEBUG,"Found matching nfo file: %s", strNfo.c_str());
CLog::Log(LOGDEBUG,"Found matching nfo file: %s", CURL::GetRedacted(strNfo).c_str());
result = nfoReader.Create(strNfo, info);
if (result == CNfoFile::FULL_NFO)
{
Expand Down Expand Up @@ -1292,7 +1292,7 @@ INFO_RET CMusicInfoScanner::DownloadArtistInfo(const CArtist& artist, const ADDO
CNfoFile nfoReader;
if (XFILE::CFile::Exists(strNfo))
{
CLog::Log(LOGDEBUG,"Found matching nfo file: %s", strNfo.c_str());
CLog::Log(LOGDEBUG,"Found matching nfo file: %s", CURL::GetRedacted(strNfo).c_str());
result = nfoReader.Create(strNfo, info);
if (result == CNfoFile::FULL_NFO)
{
Expand Down

0 comments on commit a836b03

Please sign in to comment.