Skip to content

Commit

Permalink
Fix axios vulnerability by moving to Fetch (#3769)
Browse files Browse the repository at this point in the history
* bump prettier + config

* run prettier on portal

* update to use native HTTP fetch

* clean up some typescript lint problems

* regen

* fix

* rebuild

* send correct content type

* regen
  • Loading branch information
hawkowl authored Aug 13, 2024
1 parent 29e09d5 commit a1c4de7
Show file tree
Hide file tree
Showing 39 changed files with 21,210 additions and 21,031 deletions.
6 changes: 3 additions & 3 deletions pkg/portal/assets/v2/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"files": {
"main.js": "/static/js/main.cef1fecf.js",
"main.js": "/static/js/main.df4abe60.js",
"index.html": "/index.html",
"main.cef1fecf.js.map": "/static/js/main.cef1fecf.js.map"
"main.df4abe60.js.map": "/static/js/main.df4abe60.js.map"
},
"entrypoints": [
"static/js/main.cef1fecf.js"
"static/js/main.df4abe60.js"
]
}
2 changes: 1 addition & 1 deletion pkg/portal/assets/v2/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>ARO Portal</title><script defer="defer" src="/static/js/main.cef1fecf.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>ARO Portal</title><script defer="defer" src="/static/js/main.df4abe60.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
3 changes: 0 additions & 3 deletions pkg/portal/assets/v2/build/static/js/main.cef1fecf.js

This file was deleted.

1 change: 0 additions & 1 deletion pkg/portal/assets/v2/build/static/js/main.cef1fecf.js.map

This file was deleted.

3 changes: 3 additions & 0 deletions pkg/portal/assets/v2/build/static/js/main.df4abe60.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/portal/assets/v2/build/static/js/main.df4abe60.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions portal/v2/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ env:
es2021: true
node: true
extends:
- 'plugin:react/recommended'
- "plugin:react/recommended"
- "eslint:recommended"
- "plugin:react/jsx-runtime"
parser: '@typescript-eslint/parser'
parser: "@typescript-eslint/parser"
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: 12
sourceType: module
plugins:
- react
- '@typescript-eslint'
- "@typescript-eslint"
settings:
react:
createClass: "createReactClass"
Expand Down
28 changes: 14 additions & 14 deletions portal/v2/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
const webpack = require('webpack');
const webpack = require("webpack")

module.exports = function override(config) {
const fallback = config.resolve.fallback || {};
const fallback = config.resolve.fallback || {}

Object.assign(fallback, {
"path": require.resolve('path-browserify'),
"buffer": require.resolve("buffer/")
});
path: require.resolve("path-browserify"),
buffer: require.resolve("buffer/"),
})

config.resolve.fallback = fallback;
config.resolve.fallback = fallback

config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false
}
});
fullySpecified: false,
},
})

config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
]);
])

return config;
};
return config
}
Loading

0 comments on commit a1c4de7

Please sign in to comment.