Repository navigation
Pass auth to bugs.webkit.org properly #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gsnedders
merged 1 commit into
web-platform-tests:main
from
gsnedders:fix-webkit-export-auth
Oct 22, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| 'use strict'; | ||
|
|
||
| const assert = require('chai').assert, | ||
| fetch = require('node-fetch'), | ||
| replay = require('replay'), | ||
| bugsWebkit = require('../lib/bugs-webkit'); | ||
|
|
||
| suite('bugs-webkit', function() { | ||
| const token = 'fake-bugzilla-key-1234'; | ||
|
|
||
| setup(function() { | ||
| // Relies on replay refusing requests that have no fixture. | ||
| if (replay.mode !== 'replay') { | ||
| this.skip(); | ||
| } | ||
| bugsWebkit.setToken(token); | ||
| }); | ||
|
|
||
| teardown(function() { | ||
| // The placeholder that test/setup.js uses in replay mode. | ||
| bugsWebkit.setToken('REDACTED'); | ||
| }); | ||
|
|
||
| test('redacts the API key from fetch errors', async function() { | ||
| let error; | ||
| try { | ||
| // There is no fixture for this bug, so the request fails. | ||
| await bugsWebkit.get('/rest/bug/:id', { id: 0 }); | ||
| } catch (e) { | ||
| error = e; | ||
| } | ||
| assert.instanceOf(error, fetch.FetchError); | ||
| assert.equal(error.type, 'system'); | ||
| assert.equal(error.code, 'ECONNREFUSED'); | ||
| assert.include(error.message, 'Bugzilla_api_key=REDACTED'); | ||
| assert.notInclude(error.message, token); | ||
| assert.notInclude(error.stack, token); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,22 @@ | ||
| GET /rest/bug/201401 | ||
| GET /rest/bug/201401?exclude_fields=update_token&Bugzilla_api_key=REDACTED | ||
| accept: */* | ||
| accept-encoding: gzip,deflate | ||
|
|
||
| HTTP/1.1 200 OK | ||
| date: Sat, 30 Nov 2019 14:02:07 GMT | ||
| server: Apache/2.4 | ||
| x-xss-protection: 1; mode=block | ||
| date: Wed, 21 Oct 2026 14:35:56 GMT | ||
| content-type: application/json; charset=UTF-8 | ||
| access-control-allow-headers: origin, content-type, accept, x-requested-with | ||
| access-control-allow-origin: *, * | ||
| x-frame-options: SAMEORIGIN | ||
| access-control-allow-origin: * | ||
| x-content-type-options: nosniff | ||
| set-cookie: Bugzilla_login_request_cookie=209DFljFZh; path=/; secure; HttpOnly | ||
| etag: jXilBcff1nXfTXVGCwb65w | ||
| strict-transport-security: max-age=7776000 | ||
| connection: close | ||
| x-frame-options: SAMEORIGIN | ||
| x-xss-protection: 1; mode=block | ||
| etag: 5N+/698Y31SVc6MFm5NmaA | ||
| strict-transport-security: max-age=31536000; includeSubDomains | ||
| age: 1 | ||
| transfer-encoding: chunked | ||
| content-type: application/json; charset=UTF-8 | ||
| connection: keep-alive | ||
| via: https/1.1 uklon5-edge-fx-034.ts.apple.com (acdn/25.17695) | ||
| x-cache: skipped | ||
| cdnuuid: 36f1ad84-7295-4737-a38f-62aa087b4c56-1237697011 | ||
|
|
||
| {"bugs":[{"priority":"P2","assigned_to_detail":{"email":"aboya@igalia.com","real_name":"Alicia Boya García","name":"aboya@igalia.com","id":26809},"blocks":[],"creator":"mcatanzaro@gnome.org","last_change_time":"2019-10-24T16:40:06Z","is_cc_accessible":true,"keywords":["InRadar"],"creator_detail":{"email":"mcatanzaro@gnome.org","real_name":"Michael Catanzaro","name":"mcatanzaro@gnome.org","id":21676},"cc":["aboya@igalia.com","bugs-noreply@webkitgtk.org","calvaris@igalia.com","cgarcia@igalia.com","commit-queue@webkit.org","eric.carlson@apple.com","ews@webkit.org","glenn@skynav.com","gns@gnome.org","jer.noble@apple.com","mario@webkit.org","mcatanzaro@gnome.org","menard@kde.org","philipj@opera.com","pnormand@igalia.com","sergio@correia.cc","vjaquez@igalia.com","webkit-bug-importer@group.apple.com"],"url":"","assigned_to":"aboya@igalia.com","groups":[],"see_also":["https://github.com/web-platform-tests/wpt/pull/19538"],"id":201401,"whiteboard":"","creation_time":"2019-09-02T14:42:47Z","qa_contact":"","depends_on":[],"dupe_of":null,"resolution":"FIXED","classification":"Unclassified","alias":[],"op_sys":"Linux","status":"RESOLVED","cc_detail":[{"email":"aboya@igalia.com","real_name":"Alicia Boya García","name":"aboya@igalia.com","id":26809},{"email":"bugs-noreply@webkitgtk.org","real_name":"WebKitGTK+ bugs","name":"bugs-noreply@webkitgtk.org","id":24100},{"email":"calvaris@igalia.com","real_name":"Xabier Rodríguez Calvar","name":"calvaris@igalia.com","id":18338},{"email":"cgarcia@igalia.com","real_name":"Carlos Garcia Campos","name":"cgarcia@igalia.com","id":10421},{"email":"commit-queue@webkit.org","real_name":"WebKit Commit Bot","name":"commit-queue@webkit.org","id":10616},{"email":"eric.carlson@apple.com","real_name":"Eric Carlson","name":"eric.carlson@apple.com","id":2769},{"email":"ews@webkit.org","real_name":"Build Bot","name":"ews@webkit.org","id":26490},{"email":"glenn@skynav.com","real_name":"Glenn Adams","name":"glenn@skynav.com","id":14926},{"email":"gns@gnome.org","real_name":"Gustavo Noronha (kov)","name":"gns@gnome.org","id":7052},{"email":"jer.noble@apple.com","real_name":"Jer Noble","name":"jer.noble@apple.com","id":12084},{"email":"mario@webkit.org","real_name":"Mario Sanchez Prada","name":"mario@webkit.org","id":10290},{"email":"mcatanzaro@gnome.org","real_name":"Michael Catanzaro","name":"mcatanzaro@gnome.org","id":21676},{"email":"menard@kde.org","real_name":"Alexis Menard (darktears)","name":"menard@kde.org","id":12077},{"email":"philipj@opera.com","real_name":"Philip Jägenstedt","name":"philipj@opera.com","id":10312},{"email":"pnormand@igalia.com","real_name":"Philippe Normand","name":"pnormand@igalia.com","id":10698},{"email":"sergio@correia.cc","real_name":"Sergio Correia (qrwteyrutiyoup)","name":"sergio@correia.cc","id":20230},{"email":"vjaquez@igalia.com","real_name":"Víctor M. Jáquez L.","name":"vjaquez@igalia.com","id":14649},{"email":"webkit-bug-importer@group.apple.com","real_name":"Radar WebKit Bug Importer","name":"webkit-bug-importer@group.apple.com","id":15060}],"summary":"[GStreamer] cnn.com videos don't work","is_open":false,"platform":"PC","severity":"Normal","flags":[],"version":"WebKit Nightly Build","deadline":null,"component":"Media","is_creator_accessible":true,"product":"WebKit","is_confirmed":true,"target_milestone":"---"}],"faults":[]} | ||
| {"faults":[],"bugs":[{"deadline":null,"url":"","blocks":[],"qa_contact":"","dupe_of":null,"keywords":["InRadar"],"last_change_time":"2021-11-06T11:31:47Z","severity":"Normal","depends_on":[],"product":"WebKit","summary":"[GStreamer] cnn.com videos don't work","creator":"mcatanzaro@gnome.org","id":201401,"op_sys":"Linux","see_also":["https://github.com/web-platform-tests/wpt/pull/19538"],"flags":[],"creator_detail":{"email":"mcatanzaro@gnome.org","id":21676,"name":"mcatanzaro@gnome.org","real_name":"Michael Catanzaro"},"resolution":"FIXED","alias":[],"assigned_to":"aboya@igalia.com","component":"Media","is_creator_accessible":true,"version":"WebKit Nightly Build","classification":"Unclassified","status":"RESOLVED","cc":["aboya@igalia.com","bugs-noreply@webkitgtk.org","calvaris@igalia.com","cgarcia@igalia.com","commit-queue@webkit.org","eric.carlson@apple.com","ews-watchlist@webkit.org","glenn@skynav.com","gustavo@noronha.dev.br","jer.noble@apple.com","mario@igalia.com","mcatanzaro@gnome.org","menard@kde.org","ntim@apple.com","philipj@opera.com","pnormand@igalia.com","sergio@correia.cc","vjaquez@igalia.com","webkit-bug-importer@group.apple.com"],"is_confirmed":true,"assigned_to_detail":{"real_name":"Alicia Boya García","name":"aboya@igalia.com","id":26809,"email":"aboya@igalia.com"},"whiteboard":"","platform":"PC","priority":"P2","target_milestone":"---","groups":[],"is_open":false,"cc_detail":[{"id":26809,"real_name":"Alicia Boya García","name":"aboya@igalia.com","email":"aboya@igalia.com"},{"email":"bugs-noreply@webkitgtk.org","real_name":"WebKitGTK+ bugs","name":"bugs-noreply@webkitgtk.org","id":24100},{"email":"calvaris@igalia.com","name":"calvaris@igalia.com","real_name":"Xabier Rodríguez Calvar","id":18338},{"id":10421,"real_name":"Carlos Garcia Campos","name":"cgarcia@igalia.com","email":"cgarcia@igalia.com"},{"real_name":"WebKit Commit Bot","name":"commit-queue@webkit.org","id":10616,"email":"commit-queue@webkit.org"},{"email":"eric.carlson@apple.com","id":2769,"name":"eric.carlson@apple.com","real_name":"Eric Carlson"},{"real_name":"EWS Watchlist","name":"ews-watchlist@webkit.org","id":26490,"email":"ews-watchlist@webkit.org"},{"id":14926,"name":"glenn@skynav.com","real_name":"Glenn Adams","email":"glenn@skynav.com"},{"email":"gustavo@noronha.dev.br","id":7052,"name":"gustavo@noronha.dev.br","real_name":"Gustavo Noronha (kov)"},{"real_name":"Jer Noble","name":"jer.noble@apple.com","id":12084,"email":"jer.noble@apple.com"},{"real_name":"Mario Sanchez Prada","name":"mario@igalia.com","id":10290,"email":"mario@igalia.com"},{"email":"mcatanzaro@gnome.org","name":"mcatanzaro@gnome.org","real_name":"Michael Catanzaro","id":21676},{"email":"menard@kde.org","real_name":"Alexis Menard (darktears)","name":"menard@kde.org","id":12077},{"id":34428,"real_name":"Tim Nguyen (:ntim)","name":"ntim@apple.com","email":"ntim@apple.com"},{"email":"philipj@opera.com","name":"philipj@opera.com","real_name":"Philip Jägenstedt","id":10312},{"real_name":"Philippe Normand","name":"pnormand@igalia.com","id":10698,"email":"pnormand@igalia.com"},{"real_name":"Sergio Correia (qrwteyrutiyoup)","name":"sergio@correia.cc","id":20230,"email":"sergio@correia.cc"},{"email":"vjaquez@igalia.com","name":"vjaquez@igalia.com","real_name":"Víctor M. Jáquez L.","id":14649},{"name":"webkit-bug-importer@group.apple.com","real_name":"Radar WebKit Bug Importer","id":15060,"email":"webkit-bug-importer@group.apple.com"}],"creation_time":"2019-09-02T14:42:47Z","is_cc_accessible":true}]} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this had been broken, @DanielRyanSmith, can you check this actually exists and works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have confirmed the code here retrieves full emails back with this change