Bug 196980 - Link clicks in PDFs shouldn't send referrer headers
Summary: Link clicks in PDFs shouldn't send referrer headers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-16 13:36 PDT by Brady Eidson
Modified: 2019-04-17 15:48 PDT (History)
6 users (show)

See Also:


Attachments
Patch (18.12 KB, patch)
2019-04-16 13:41 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (20.12 KB, patch)
2019-04-16 13:50 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-highsierra (3.08 MB, application/zip)
2019-04-16 14:42 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (9.92 MB, application/zip)
2019-04-16 15:53 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews202 for win-future (12.95 MB, application/zip)
2019-04-16 15:53 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews112 for mac-highsierra (3.14 MB, application/zip)
2019-04-16 22:30 PDT, EWS Watchlist
no flags Details
Patch (18.19 KB, patch)
2019-04-17 11:32 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch (16.78 KB, patch)
2019-04-17 12:14 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (3.18 MB, application/zip)
2019-04-17 13:52 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2019-04-16 13:36:25 PDT
Link clicks in PDFs shouldn't send referrer headers

This is a good harden that matches other browsers.
Comment 1 Brady Eidson 2019-04-16 13:41:32 PDT
Created attachment 367560 [details]
Patch
Comment 2 Brady Eidson 2019-04-16 13:50:40 PDT
Created attachment 367563 [details]
Patch
Comment 3 Tim Horton 2019-04-16 13:58:18 PDT
Comment on attachment 367563 [details]
Patch

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

> LayoutTests/http/tests/security/pdf-referrer.html:4
> +if (window.testRunner) { 

Please make it more clear how this checks for the referrer

> LayoutTests/http/tests/security/pdf-referrer.html:13
> +    	testRunner.notifyDone();

weird extra tab
Comment 4 EWS Watchlist 2019-04-16 14:42:38 PDT
Comment on attachment 367563 [details]
Patch

Attachment 367563 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/11889925

New failing tests:
http/tests/security/pdf-referrer.html
Comment 5 EWS Watchlist 2019-04-16 14:42:40 PDT
Created attachment 367575 [details]
Archive of layout-test-results from ews100 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 6 Brady Eidson 2019-04-16 15:28:50 PDT
This layout test is a PITA.

Working on an API test instead.
Comment 7 EWS Watchlist 2019-04-16 15:53:03 PDT
Comment on attachment 367563 [details]
Patch

Attachment 367563 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/11890539

New failing tests:
http/tests/security/pdf-referrer.html
Comment 8 EWS Watchlist 2019-04-16 15:53:05 PDT
Created attachment 367585 [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.13.6
Comment 9 EWS Watchlist 2019-04-16 15:53:11 PDT
Comment on attachment 367563 [details]
Patch

Attachment 367563 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/11890702

New failing tests:
http/tests/security/pdf-referrer.html
Comment 10 EWS Watchlist 2019-04-16 15:53:23 PDT
Created attachment 367586 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Comment 11 EWS Watchlist 2019-04-16 22:30:21 PDT
Comment on attachment 367563 [details]
Patch

Attachment 367563 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/11895605

New failing tests:
http/tests/security/pdf-referrer.html
Comment 12 EWS Watchlist 2019-04-16 22:30:23 PDT
Created attachment 367612 [details]
Archive of layout-test-results from ews112 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 13 Brady Eidson 2019-04-17 11:32:32 PDT
Created attachment 367658 [details]
Patch
Comment 14 Brady Eidson 2019-04-17 11:33:52 PDT
Layout test ❌
API test ✅
Comment 15 EWS Watchlist 2019-04-17 11:35:49 PDT
Attachment 367658 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFLinkReferrer.mm:29:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
Total errors found: 1 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Brady Eidson 2019-04-17 12:14:57 PDT
Created attachment 367661 [details]
Patch
Comment 17 EWS Watchlist 2019-04-17 13:52:35 PDT
Comment on attachment 367661 [details]
Patch

Attachment 367661 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/11904331

New failing tests:
imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html
Comment 18 EWS Watchlist 2019-04-17 13:52:37 PDT
Created attachment 367673 [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.13.6
Comment 19 Brady Eidson 2019-04-17 15:42:09 PDT
(In reply to Build Bot from comment #18)
> Created attachment 367673 [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.13.6

Those failures definitely not from this patch.
Comment 20 WebKit Commit Bot 2019-04-17 15:47:14 PDT
Comment on attachment 367661 [details]
Patch

Clearing flags on attachment: 367661

Committed r244405: <https://trac.webkit.org/changeset/244405>
Comment 21 WebKit Commit Bot 2019-04-17 15:47:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 22 Radar WebKit Bug Importer 2019-04-17 15:48:39 PDT
<rdar://problem/49995849>