Adopt secure log for Network error log
authorKeunsoon Lee <keunsoon.lee@samsung.com>
Tue, 7 May 2013 04:58:22 +0000 (13:58 +0900)
committerKeunsoon Lee <keunsoon.lee@samsung.com>
Tue, 7 May 2013 08:34:53 +0000 (17:34 +0900)
[Title] Adopt secure log for Network error log
[Issue#] N/A
[Problem] N/A
[Cause] Hide delicate personal data from log
[Solution] Adopt secure log

Change-Id: I6f6cf2c2437f3eb66f3e0c993df1041d7c1be096

Source/WebCore/platform/network/soup/tizen/ResourceHandleSoupTizen.cpp
Source/WebKit2/WebProcess/efl/WebProcessEfl.cpp

index 0b8519e..b4fd42b 100755 (executable)
@@ -317,9 +317,9 @@ static void gotHeadersCallback(SoupMessage* msg, gpointer data)
 
                 localt.tm_mon++;    // mon : 0~11
 
-                TIZEN_LOGE("[Network] ResourceHandleSoup date =%02d/%02d/%02d", localt.tm_year, localt.tm_mon, localt.tm_mday);
+                TIZEN_SECURE_LOGE("[Network] ResourceHandleSoup date =%02d/%02d/%02d", localt.tm_year, localt.tm_mon, localt.tm_mday);
                 // Never print URI itself. Whole URI can import non-printable character in it.
-                TIZEN_LOGE("[Network] ResourceHandleSoup host = %s, isTrusted = %d, errors = %d", soup_uri_get_host(soupUri), isTrusted, static_cast<int>(errors));
+                TIZEN_SECURE_LOGE("[Network] ResourceHandleSoup host = %s, isTrusted = %d, errors = %d", soup_uri_get_host(soupUri), isTrusted, static_cast<int>(errors));
             }
 
             bool shouldContinue = true;
@@ -588,7 +588,7 @@ static void sendRequestCallback(GObject* source, GAsyncResult* res, gpointer dat
         }
 #endif
 
-        TIZEN_LOGE("[Network] sendRequestCallback error [%s]", error->message);
+        TIZEN_SECURE_LOGE("[Network] sendRequestCallback error [%s]", error->message);
 
         client->didFail(handle.get(), convertSoupErrorToResourceError(error.get(), d->m_soupRequest.get(), soupMessage));
         cleanupSoupRequestOperation(handle.get());
@@ -940,7 +940,7 @@ static bool startHTTPRequest(ResourceHandle* handle)
     GOwnPtr<GError> error;
     d->m_soupRequest = adoptGRef(soup_requester_request(requester, url.string().utf8().data(), &error.outPtr()));
     if (error) {
-        TIZEN_LOGE("ResourceHandleSoup startHTTPRequest error [%s] ", error->message);
+        TIZEN_SECURE_LOGE("ResourceHandleSoup startHTTPRequest error [%s] ", error->message);
         d->m_soupRequest = 0;
         return false;
     }
@@ -1250,7 +1250,7 @@ static void readCallback(GObject* source, GAsyncResult* asyncResult, gpointer da
     GOwnPtr<GError> error;
     gssize bytesRead = g_input_stream_read_finish(d->m_inputStream.get(), asyncResult, &error.outPtr());
     if (error) {
-        TIZEN_LOGE("[Network] ResourceHandleSoup readCallback error from g_input_stream_read_finish [%s]", error->message);
+        TIZEN_SECURE_LOGE("[Network] ResourceHandleSoup readCallback error from g_input_stream_read_finish [%s]", error->message);
         client->didFail(handle.get(), convertSoupErrorToResourceError(error.get(), d->m_soupRequest.get()));
         cleanupSoupRequestOperation(handle.get());
         return;
@@ -1333,7 +1333,7 @@ static bool startNonHTTPRequest(ResourceHandle* handle, KURL url)
     ASSERT(handle);
 
     if (handle->firstRequest().httpMethod() != "GET" && handle->firstRequest().httpMethod() != "POST") {
-        TIZEN_LOGE("[Network] ResourceHandleSoup startNonHTTPRequest httpMethod [%s] [%s]", handle->firstRequest().httpMethod().utf8().data(), url.string().utf8().data());
+        TIZEN_SECURE_LOGE("[Network] ResourceHandleSoup startNonHTTPRequest httpMethod [%s] [%s]", handle->firstRequest().httpMethod().utf8().data(), url.string().utf8().data());
         return false;
     }
 
@@ -1358,7 +1358,7 @@ static bool startNonHTTPRequest(ResourceHandle* handle, KURL url)
     GOwnPtr<GError> error;
     d->m_soupRequest = adoptGRef(soup_requester_request(requester, urlStr.data(), &error.outPtr()));
     if (error) {
-        TIZEN_LOGE("[Network] ResourceHandleSoup startNonHTTPRequest error from soup_requester_request [%s]", error->message);
+        TIZEN_SECURE_LOGE("[Network] ResourceHandleSoup startNonHTTPRequest error from soup_requester_request [%s]", error->message);
         d->m_soupRequest = 0;
         return false;
     }
index 7ffeb41..243a9a0 100755 (executable)
@@ -251,7 +251,7 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters
 #if ENABLE(TIZEN_SOUP_CACHE_DIRECTORY_SET)
 void WebProcess::setSoupDataDirectory(const String& soupDataDirectory)
 {
-    TIZEN_LOGE("[Network] WebProcess::setSoupDataDirectory soupDataDirectory [%s]", soupDataDirectory.utf8().data());
+    TIZEN_SECURE_LOGI("[Network] WebProcess::setSoupDataDirectory soupDataDirectory [%s]", soupDataDirectory.utf8().data());
 #if ENABLE(TIZEN_SOUP_COOKIE_CACHE_FOR_WEBKIT2)
 #if USE(SOUP)
     SoupCookieJar* cookieJar = 0;