зеркало из https://github.com/mozilla/treeherder.git
This reverts commit b37ef957a2
.
There appears to be a bug with the webpack module resolution, such that Treeherder's upgraded Hawk 7 is being used by taskcluster-client, even though that has a separate dependency on Hawk 6, and so should be using its own copy of Hawk.
For now, let's roll back to Hawk 7 for Treeherder's direct dependency (used by the login flow), to work around this.
This commit is contained in:
Родитель
982ec2d99b
Коммит
2c93921725
|
@ -26,7 +26,7 @@
|
|||
"deepmerge": "1.5.2",
|
||||
"eslint-plugin-react": "7.5.1",
|
||||
"font-awesome": "4.7.0",
|
||||
"hawk": "7.0.5",
|
||||
"hawk": "6.0.2",
|
||||
"history": "4.7.2",
|
||||
"jquery": "3.2.1",
|
||||
"jquery.scrollto": "2.1.2",
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
// Importing from browser rather than `hawk` to work around:
|
||||
// https://github.com/hueniverse/hawk/issues/223
|
||||
import Hawk from 'hawk/lib/browser';
|
||||
|
||||
/**
|
||||
* This component handles logging in to Taskcluster Authentication
|
||||
*
|
||||
|
@ -148,6 +144,7 @@ treeherder.component("loginCallback", {
|
|||
`,
|
||||
controller: ['localStorageService', '$location', '$window', '$http', '$scope',
|
||||
function (localStorageService, $location, $window, $http, $scope) {
|
||||
const hawk = require('hawk');
|
||||
const host = $location.host();
|
||||
const port = $location.port();
|
||||
const loginUrl = `${$location.protocol()}://${host}:${port}/api/auth/login/`;
|
||||
|
@ -166,15 +163,15 @@ treeherder.component("loginCallback", {
|
|||
const results = $location.search();
|
||||
if (results.certificate) {
|
||||
results.certificate = JSON.parse(results.certificate);
|
||||
payload.ext = Hawk.utils.base64urlEncode(JSON.stringify({ certificate: results.certificate }));
|
||||
payload.ext = hawk.utils.base64urlEncode(JSON.stringify({ certificate: results.certificate }));
|
||||
}
|
||||
|
||||
const { header } = Hawk.client.header(loginUrl, 'GET', payload);
|
||||
const header = hawk.client.header(loginUrl, 'GET', payload);
|
||||
|
||||
// send a request from client side to TH server signed with TC
|
||||
// creds from login.taskcluster.net
|
||||
$http.get(loginUrl,
|
||||
{ headers: { tcauth: header } })
|
||||
{ headers: { tcauth: header.field } })
|
||||
.then(function (resp) {
|
||||
var user = resp.data;
|
||||
user.loggedin = true;
|
||||
|
|
64
yarn.lock
64
yarn.lock
|
@ -1186,23 +1186,22 @@ boom@2.x.x:
|
|||
dependencies:
|
||||
hoek "2.x.x"
|
||||
|
||||
boom@7.x.x:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/boom/-/boom-7.1.1.tgz#50392a4e3417e971f1ad28622c20e832275260bb"
|
||||
boom@4.x.x:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
|
||||
dependencies:
|
||||
hoek "5.x.x"
|
||||
hoek "4.x.x"
|
||||
|
||||
boom@5.x.x:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02"
|
||||
dependencies:
|
||||
hoek "4.x.x"
|
||||
|
||||
bootstrap@4.0.0-beta.2:
|
||||
version "4.0.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.0.0-beta.2.tgz#4d67d2aa2219f062cd90bc1247e6747b9e8fd051"
|
||||
|
||||
bounce@1.x.x:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/bounce/-/bounce-1.2.0.tgz#e3bac68c73fd256e38096551efc09f504873c8c8"
|
||||
dependencies:
|
||||
boom "7.x.x"
|
||||
hoek "5.x.x"
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||
|
@ -1778,11 +1777,11 @@ cryptiles@2.x.x:
|
|||
dependencies:
|
||||
boom "2.x.x"
|
||||
|
||||
cryptiles@4.x.x:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-4.1.1.tgz#169256b9df9fe3c73f8085c99e30b32247d4ab46"
|
||||
cryptiles@3.x.x:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe"
|
||||
dependencies:
|
||||
boom "7.x.x"
|
||||
boom "5.x.x"
|
||||
|
||||
crypto-browserify@^3.11.0:
|
||||
version "3.12.0"
|
||||
|
@ -3371,14 +3370,14 @@ hawk@3.1.3, hawk@~3.1.3:
|
|||
hoek "2.x.x"
|
||||
sntp "1.x.x"
|
||||
|
||||
hawk@7.0.5:
|
||||
version "7.0.5"
|
||||
resolved "https://registry.yarnpkg.com/hawk/-/hawk-7.0.5.tgz#7355887e2e714af5de2152bbfa0d67e6c91fd502"
|
||||
hawk@6.0.2:
|
||||
version "6.0.2"
|
||||
resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
|
||||
dependencies:
|
||||
boom "7.x.x"
|
||||
cryptiles "4.x.x"
|
||||
hoek "5.x.x"
|
||||
sntp "3.x.x"
|
||||
boom "4.x.x"
|
||||
cryptiles "3.x.x"
|
||||
hoek "4.x.x"
|
||||
sntp "2.x.x"
|
||||
|
||||
hawk@^2.3.1:
|
||||
version "2.3.1"
|
||||
|
@ -3428,9 +3427,9 @@ hoek@2.x.x:
|
|||
version "2.16.3"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
||||
|
||||
hoek@5.x.x:
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-5.0.2.tgz#d2f2c95d36fe7189cf8aa8c237abc1950eca1378"
|
||||
hoek@4.x.x:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
|
||||
|
||||
hoist-non-react-statics@^2.2.1, hoist-non-react-statics@^2.3.0:
|
||||
version "2.3.1"
|
||||
|
@ -6259,14 +6258,11 @@ sntp@1.x.x:
|
|||
dependencies:
|
||||
hoek "2.x.x"
|
||||
|
||||
sntp@3.x.x:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sntp/-/sntp-3.0.1.tgz#1aa9088d3eb844ea8c0980fce1877884d4117d09"
|
||||
sntp@2.x.x:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
|
||||
dependencies:
|
||||
boom "7.x.x"
|
||||
bounce "1.x.x"
|
||||
hoek "5.x.x"
|
||||
teamwork "3.x.x"
|
||||
hoek "4.x.x"
|
||||
|
||||
socket.io-adapter@0.5.0:
|
||||
version "0.5.0"
|
||||
|
@ -6653,10 +6649,6 @@ taskcluster-client@2.5.4:
|
|||
optionalDependencies:
|
||||
sockjs-client "^1.0.3"
|
||||
|
||||
teamwork@3.x.x:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/teamwork/-/teamwork-3.0.1.tgz#ff38c7161f41f8070b7813716eb6154036ece196"
|
||||
|
||||
text-table@~0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
|
|
Загрузка…
Ссылка в новой задаче