Bug 159195 - Cross-domain video loads do not prompt for authorization.
Summary: Cross-domain video loads do not prompt for authorization.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-27 23:20 PDT by Jer Noble
Modified: 2016-06-28 14:28 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.32 KB, patch)
2016-06-27 23:22 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (5.94 KB, patch)
2016-06-28 08:55 PDT, Jer Noble
bfulgham: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (797.68 KB, application/zip)
2016-06-28 09:43 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews113 for mac-yosemite (1.43 MB, application/zip)
2016-06-28 09:53 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (1.43 MB, application/zip)
2016-06-28 10:32 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2016-06-27 23:20:43 PDT
Cross-domain video loads do not prompt for authorization.
Comment 1 Jer Noble 2016-06-27 23:22:46 PDT
<rdar://problem/26234612>
Comment 2 Jer Noble 2016-06-27 23:22:55 PDT
Created attachment 282213 [details]
Patch
Comment 3 Alex Christensen 2016-06-27 23:52:11 PDT
Comment on attachment 282213 [details]
Patch

This can definitely be tested.  setAuthenticationUsername, setAuthenticationPassword, create a video element that responds with a basic authentication challenge if there are no credentials.
Comment 4 Jer Noble 2016-06-27 23:55:30 PDT
Those tests already exist (cross domain even) and don't catch this. The problem is not whether or not a credential is given, but whether the user is asked for one if there is no stored credential.
Comment 6 Alex Christensen 2016-06-28 00:35:06 PDT
So you're saying if you change 127.0.0.1 in that test to localhost, it won't catch this problem?  I'll have to look at this when I have a machine with Sierra on it.
Comment 7 Jer Noble 2016-06-28 08:13:44 PDT
(In reply to comment #6)
> So you're saying if you change 127.0.0.1 in that test to localhost, it won't
> catch this problem?  I'll have to look at this when I have a machine with
> Sierra on it.

Yep. Just ran that test myself. No matter whether you use 127.0.0.1 or localhost in the <video> src, you still get an auth challenge.
Comment 8 Jer Noble 2016-06-28 08:27:02 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > So you're saying if you change 127.0.0.1 in that test to localhost, it won't
> > catch this problem?  I'll have to look at this when I have a machine with
> > Sierra on it.
> 
> Yep. Just ran that test myself. No matter whether you use 127.0.0.1 or
> localhost in the <video> src, you still get an auth challenge.

Ack, I'm wrong. I ran it against my fixed build, not against shipping.  On shipping, changing 127.0.0.1 to localhost does cause an error. I'll add a test.
Comment 9 Jer Noble 2016-06-28 08:55:45 PDT
Created attachment 282249 [details]
Patch
Comment 10 Build Bot 2016-06-28 09:43:10 PDT
Comment on attachment 282249 [details]
Patch

Attachment 282249 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1586957

New failing tests:
http/tests/media/video-auth.html
Comment 11 Build Bot 2016-06-28 09:43:13 PDT
Created attachment 282250 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 12 Build Bot 2016-06-28 09:53:01 PDT
Comment on attachment 282249 [details]
Patch

Attachment 282249 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1586959

New failing tests:
http/tests/media/video-auth.html
Comment 13 Build Bot 2016-06-28 09:53:04 PDT
Created attachment 282251 [details]
Archive of layout-test-results from ews113 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 14 Build Bot 2016-06-28 10:32:35 PDT
Comment on attachment 282249 [details]
Patch

Attachment 282249 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1587111

New failing tests:
animations/multiple-backgrounds.html
Comment 15 Build Bot 2016-06-28 10:32:37 PDT
Created attachment 282256 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 16 Brent Fulgham 2016-06-28 10:38:40 PDT
Comment on attachment 282249 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=282249&action=review

R=me, but please provide new baselines before landing.

> LayoutTests/ChangeLog:5
> +        <rdar://problem/26234612>

This test looks good, but you forgot to include new baselines! :-)
Comment 17 Alex Christensen 2016-06-28 10:39:26 PDT
Yep
Comment 18 Jer Noble 2016-06-28 11:25:54 PDT
Committed r202579: <http://trac.webkit.org/changeset/202579>
Comment 19 Ryan Haddad 2016-06-28 14:15:48 PDT
The test added with this change is failing on mac-wk2:

http/tests/media/video-auth.html
<https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fmedia%2Fvideo-auth.html>
Comment 20 Ryan Haddad 2016-06-28 14:28:18 PDT
Rebaselined test for WK2 in <https://trac.webkit.org/r202587>