Changeset 167185 in webkit
- Timestamp:
- Apr 12, 2014 1:01:45 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167184 r167185 1 2014-04-12 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [SOUP] Libsoup internal credential setting should be controlled by loader decision 4 https://bugs.webkit.org/show_bug.cgi?id=130963 5 6 Reviewed by Darin Adler. 7 8 * platform/efl/TestExpectations: Unskipped http/tests/xmlhttprequest/cross-origin-no-authorization.html. 9 * platform/gtk/TestExpectations: Ditto. 10 1 11 2014-04-12 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> 2 12 -
trunk/LayoutTests/platform/efl/TestExpectations
r167098 r167185 238 238 http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml 239 239 http/tests/xmlhttprequest/access-control-basic-whitelist-request-headers.html 240 http/tests/xmlhttprequest/cross-origin-no-authorization.html241 240 http/tests/xmlhttprequest/logout.html 242 241 http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html -
trunk/LayoutTests/platform/gtk/TestExpectations
r167139 r167185 1247 1247 Bug(GTK) http/tests/xmlhttprequest/logout.html [ Failure ] 1248 1248 1249 Bug(GTK) http/tests/xmlhttprequest/cross-origin-no-authorization.html [ Failure ]1250 1251 1249 Bug(GTK) media/video-size-intrinsic-scale.html [ Failure ] 1252 1250 -
trunk/Source/WebCore/ChangeLog
r167183 r167185 1 2014-04-12 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [SOUP] Libsoup internal credential setting should be controlled by loader decision 4 https://bugs.webkit.org/show_bug.cgi?id=130963 5 6 Reviewed by Darin Adler. 7 8 Disabled libsoup internal authentication manager for messages for which no credential is available and no stored credentials should be used. 9 Updated synchronous loader to return whether using credentials or not according StoredCredential loader option parameter. 10 Unskipped test http/tests/xmlhttprequest/cross-origin-no-authorization.html covers the patch. 11 12 * platform/network/ResourceHandleInternal.h: 13 (WebCore::ResourceHandleInternal::ResourceHandleInternal): Added m_useAuthenticationManager boolean to control whether disable authentication manager or not. 14 * platform/network/soup/ResourceHandleSoup.cpp: 15 (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Added m_storedCredentials member. 16 (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage): Return true if stored credentials are allowed. 17 (WebCore::applyAuthenticationToRequest): Set m_useAuthenticationManager value to disable authentication manager if cannot use stored credentials and ResourceHandleInternal has no username and password. 18 (WebCore::createSoupMessageForHandleAndRequest): Disable authentication mananger according m_useAuthenticationManager value. 19 (WebCore::ResourceHandle::platformLoadResourceSynchronously): Added StoredCredentials loader option to the sync loader constructor. 20 1 21 2014-04-11 Darin Adler <darin@apple.com> 2 22 -
trunk/Source/WebCore/platform/network/ResourceHandleInternal.h
r167183 r167185 111 111 , m_redirectCount(0) 112 112 , m_previousPosition(0) 113 , m_useAuthenticationManager(true) 113 114 #endif 114 115 #if PLATFORM(COCOA) … … 203 204 int m_redirectCount; 204 205 size_t m_previousPosition; 206 bool m_useAuthenticationManager; 205 207 #endif 206 208 #if PLATFORM(GTK) -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r166506 r167185 83 83 public: 84 84 85 WebCoreSynchronousLoader(ResourceError& error, ResourceResponse& response, SoupSession* session, Vector<char>& data )85 WebCoreSynchronousLoader(ResourceError& error, ResourceResponse& response, SoupSession* session, Vector<char>& data, StoredCredentials storedCredentials) 86 86 : m_error(error) 87 87 , m_response(response) … … 89 89 , m_data(data) 90 90 , m_finished(false) 91 , m_storedCredentials(storedCredentials) 92 91 93 { 92 94 // We don't want any timers to fire while we are doing our synchronous load … … 174 176 } 175 177 178 virtual bool shouldUseCredentialStorage(ResourceHandle*) 179 { 180 return m_storedCredentials == AllowStoredCredentials; 181 } 182 176 183 void run() 177 184 { … … 187 194 bool m_finished; 188 195 GRefPtr<GMainLoop> m_mainLoop; 196 StoredCredentials m_storedCredentials; 189 197 }; 190 198 … … 356 364 } 357 365 358 if (user.isEmpty() && password.isEmpty()) 359 return; 366 if (user.isEmpty() && password.isEmpty()) { 367 // In case credential is not available from the handle and credential storage should not to be used, 368 // disable authentication manager so that credentials stored in libsoup are not used. 369 d->m_useAuthenticationManager = handle->shouldUseCredentialStorage(); 370 return; 371 } 360 372 361 373 // We always put the credentials into the URL. In the CFNetwork-port HTTP family credentials are applied in … … 937 949 if (!handle->shouldContentSniff()) 938 950 soup_message_disable_feature(soupMessage, SOUP_TYPE_CONTENT_SNIFFER); 951 if (!d->m_useAuthenticationManager) 952 soup_message_disable_feature(soupMessage, SOUP_TYPE_AUTH_MANAGER); 939 953 940 954 FormData* httpBody = request.httpBody(); … … 1271 1285 } 1272 1286 1273 void ResourceHandle::platformLoadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials /*storedCredentials*/, ResourceError& error, ResourceResponse& response, Vector<char>& data)1287 void ResourceHandle::platformLoadResourceSynchronously(NetworkingContext* context, const ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& error, ResourceResponse& response, Vector<char>& data) 1274 1288 { 1275 1289 ASSERT(!loadingSynchronousRequest); … … 1277 1291 return; // we want to avoid accidentally going into an infinite loop of requests. 1278 1292 1279 WebCoreSynchronousLoader syncLoader(error, response, sessionFromContext(context), data );1293 WebCoreSynchronousLoader syncLoader(error, response, sessionFromContext(context), data, storedCredentials); 1280 1294 RefPtr<ResourceHandle> handle = create(context, request, &syncLoader, false /*defersLoading*/, false /*shouldContentSniff*/); 1281 1295 if (!handle) -
trunk/Source/WebKit/efl/ChangeLog
r166991 r167185 1 2014-04-12 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [SOUP] Libsoup internal credential setting should be controlled by loader decision 4 https://bugs.webkit.org/show_bug.cgi?id=130963 5 6 Reviewed by Darin Adler. 7 8 * WebCoreSupport/FrameLoaderClientEfl.cpp: 9 (WebCore::FrameLoaderClientEfl::shouldUseCredentialStorage): Similarly to GTK, let soup/loader layer handle when to use credential storage. Return always true 10 1 11 2014-04-08 Ryuan Choi <ryuan.choi@samsung.com> 2 12 -
trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r165676 r167185 222 222 bool FrameLoaderClientEfl::shouldUseCredentialStorage(DocumentLoader*, unsigned long) 223 223 { 224 notImplemented(); 225 return false; 224 return true; 226 225 } 227 226
Note: See TracChangeset
for help on using the changeset viewer.