未验证 提交 95b7e74b 编写于 作者: V Vivian Lin 提交者: GitHub

Dreamview: fix potential security vulnerability (#11551)

上级 0f5174dc
因为 它太大了无法显示 source diff 。你可以改为 查看blob
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dreamview</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
loadJSON('parameters.json', (response) => {
<!doctype html><html lang="en"><head><meta charset="UTF-8"><title>Dreamview</title><meta name="viewport" content="width=device-width,initial-scale=1"><script>loadJSON('parameters.json', (response) => {
window.PARAMETERS = JSON.parse(response);
});
function loadJSON(jsonFilePath, callback) {
......@@ -21,10 +14,4 @@
}
};
xobj.send(null);
}
</script>
<link rel="shortcut icon" href="/icons/favicon.ico"><link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png"><link rel="manifest" href="/icons/manifest.json"><meta name="mobile-web-app-capable" content="yes"><meta name="theme-color" content="#fff"><meta name="application-name" content="dreamview"><link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-touch-icon-57x57.png"><link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-touch-icon-60x60.png"><link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-touch-icon-72x72.png"><link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-touch-icon-76x76.png"><link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-touch-icon-114x114.png"><link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-touch-icon-120x120.png"><link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-touch-icon-144x144.png"><link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-touch-icon-152x152.png"><link rel="apple-touch-icon" sizes="167x167" href="/icons/apple-touch-icon-167x167.png"><link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon-180x180.png"><link rel="apple-touch-icon" sizes="1024x1024" href="/icons/apple-touch-icon-1024x1024.png"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><meta name="apple-mobile-web-app-title" content="dreamview"><link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" href="/icons/apple-touch-startup-image-320x460.png"><link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" href="/icons/apple-touch-startup-image-640x920.png"><link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" href="/icons/apple-touch-startup-image-640x1096.png"><link rel="apple-touch-startup-image" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" href="/icons/apple-touch-startup-image-750x1294.png"><link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)" href="/icons/apple-touch-startup-image-1182x2208.png"><link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)" href="/icons/apple-touch-startup-image-1242x2148.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" href="/icons/apple-touch-startup-image-748x1024.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" href="/icons/apple-touch-startup-image-768x1004.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" href="/icons/apple-touch-startup-image-1496x2048.png"><link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" href="/icons/apple-touch-startup-image-1536x2008.png"><link rel="icon" type="image/png" sizes="228x228" href="/icons/coast-228x228.png"><meta name="msapplication-TileColor" content="#fff"><meta name="msapplication-TileImage" content="/icons/mstile-144x144.png"><meta name="msapplication-config" content="/icons/browserconfig.xml"><link rel="yandex-tableau-widget" href="/icons/yandex-browser-manifest.json"></head>
<body>
<div id="root"></div>
<script type="text/javascript" src="/app.bundle.js"></script></body>
</html>
}</script></head><body><div id="root"></div><script src="/app.bundle.js"></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -55,7 +55,7 @@
"eslint-loader": "^2.0.0",
"eslint-plugin-react": "^7.0.1",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"html-webpack-plugin": "4.0.0",
"image-webpack-loader": "^5.0.0",
"json-loader": "^0.5.4",
"node-sass": "^4.5.3",
......@@ -63,7 +63,6 @@
"sass-loader": "^6.0.5",
"style-loader": "^0.18.1",
"url-loader": "^0.5.8",
"webapp-webpack-plugin": "^2.6.0",
"webpack": "4.28.4",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-cli": "^3.2.3",
......
......@@ -5605,6 +5605,207 @@
}
}
},
"EStop": {
"fields": {
"isEstop": {
"type": "bool",
"id": 1
},
"reason": {
"type": "string",
"id": 2
}
}
},
"TaskStats": {
"fields": {
"name": {
"type": "string",
"id": 1
},
"timeMs": {
"type": "double",
"id": 2
}
}
},
"LatencyStats": {
"fields": {
"totalTimeMs": {
"type": "double",
"id": 1
},
"taskStats": {
"rule": "repeated",
"type": "TaskStats",
"id": 2
},
"initFrameTimeMs": {
"type": "double",
"id": 3
}
}
},
"RSSInfo": {
"fields": {
"isRssSafe": {
"type": "bool",
"id": 1
},
"curDistLon": {
"type": "double",
"id": 2
},
"rssSafeDistLon": {
"type": "double",
"id": 3
},
"accLonRangeMinimum": {
"type": "double",
"id": 4
},
"accLonRangeMaximum": {
"type": "double",
"id": 5
},
"accLatLeftRangeMinimum": {
"type": "double",
"id": 6
},
"accLatLeftRangeMaximum": {
"type": "double",
"id": 7
},
"accLatRightRangeMinimum": {
"type": "double",
"id": 8
},
"accLatRightRangeMaximum": {
"type": "double",
"id": 9
}
}
},
"ADCTrajectory": {
"fields": {
"header": {
"type": "apollo.common.Header",
"id": 1
},
"totalPathLength": {
"type": "double",
"id": 2
},
"totalPathTime": {
"type": "double",
"id": 3
},
"trajectoryPoint": {
"rule": "repeated",
"type": "apollo.common.TrajectoryPoint",
"id": 12
},
"estop": {
"type": "EStop",
"id": 6
},
"pathPoint": {
"rule": "repeated",
"type": "apollo.common.PathPoint",
"id": 13
},
"isReplan": {
"type": "bool",
"id": 9,
"options": {
"default": false
}
},
"replanReason": {
"type": "string",
"id": 22
},
"gear": {
"type": "apollo.canbus.Chassis.GearPosition",
"id": 10
},
"decision": {
"type": "apollo.planning.DecisionResult",
"id": 14
},
"latencyStats": {
"type": "LatencyStats",
"id": 15
},
"routingHeader": {
"type": "apollo.common.Header",
"id": 16
},
"debug": {
"type": "apollo.planning_internal.Debug",
"id": 8
},
"rightOfWayStatus": {
"type": "RightOfWayStatus",
"id": 17
},
"laneId": {
"rule": "repeated",
"type": "apollo.hdmap.Id",
"id": 18
},
"engageAdvice": {
"type": "apollo.common.EngageAdvice",
"id": 19
},
"criticalRegion": {
"type": "CriticalRegion",
"id": 20
},
"trajectoryType": {
"type": "TrajectoryType",
"id": 21,
"options": {
"default": "UNKNOWN"
}
},
"targetLaneId": {
"rule": "repeated",
"type": "apollo.hdmap.Id",
"id": 23
},
"rssInfo": {
"type": "RSSInfo",
"id": 100
}
},
"nested": {
"RightOfWayStatus": {
"values": {
"UNPROTECTED": 0,
"PROTECTED": 1
}
},
"CriticalRegion": {
"fields": {
"region": {
"rule": "repeated",
"type": "apollo.common.Polygon",
"id": 1
}
}
},
"TrajectoryType": {
"values": {
"UNKNOWN": 0,
"NORMAL": 1,
"PATH_FALLBACK": 2,
"SPEED_FALLBACK": 3,
"PATH_REUSED": 4
}
}
}
},
"TaskConfig": {
"oneofs": {
"taskConfig": {
......@@ -6548,207 +6749,6 @@
}
}
},
"EStop": {
"fields": {
"isEstop": {
"type": "bool",
"id": 1
},
"reason": {
"type": "string",
"id": 2
}
}
},
"TaskStats": {
"fields": {
"name": {
"type": "string",
"id": 1
},
"timeMs": {
"type": "double",
"id": 2
}
}
},
"LatencyStats": {
"fields": {
"totalTimeMs": {
"type": "double",
"id": 1
},
"taskStats": {
"rule": "repeated",
"type": "TaskStats",
"id": 2
},
"initFrameTimeMs": {
"type": "double",
"id": 3
}
}
},
"RSSInfo": {
"fields": {
"isRssSafe": {
"type": "bool",
"id": 1
},
"curDistLon": {
"type": "double",
"id": 2
},
"rssSafeDistLon": {
"type": "double",
"id": 3
},
"accLonRangeMinimum": {
"type": "double",
"id": 4
},
"accLonRangeMaximum": {
"type": "double",
"id": 5
},
"accLatLeftRangeMinimum": {
"type": "double",
"id": 6
},
"accLatLeftRangeMaximum": {
"type": "double",
"id": 7
},
"accLatRightRangeMinimum": {
"type": "double",
"id": 8
},
"accLatRightRangeMaximum": {
"type": "double",
"id": 9
}
}
},
"ADCTrajectory": {
"fields": {
"header": {
"type": "apollo.common.Header",
"id": 1
},
"totalPathLength": {
"type": "double",
"id": 2
},
"totalPathTime": {
"type": "double",
"id": 3
},
"trajectoryPoint": {
"rule": "repeated",
"type": "apollo.common.TrajectoryPoint",
"id": 12
},
"estop": {
"type": "EStop",
"id": 6
},
"pathPoint": {
"rule": "repeated",
"type": "apollo.common.PathPoint",
"id": 13
},
"isReplan": {
"type": "bool",
"id": 9,
"options": {
"default": false
}
},
"replanReason": {
"type": "string",
"id": 22
},
"gear": {
"type": "apollo.canbus.Chassis.GearPosition",
"id": 10
},
"decision": {
"type": "apollo.planning.DecisionResult",
"id": 14
},
"latencyStats": {
"type": "LatencyStats",
"id": 15
},
"routingHeader": {
"type": "apollo.common.Header",
"id": 16
},
"debug": {
"type": "apollo.planning_internal.Debug",
"id": 8
},
"rightOfWayStatus": {
"type": "RightOfWayStatus",
"id": 17
},
"laneId": {
"rule": "repeated",
"type": "apollo.hdmap.Id",
"id": 18
},
"engageAdvice": {
"type": "apollo.common.EngageAdvice",
"id": 19
},
"criticalRegion": {
"type": "CriticalRegion",
"id": 20
},
"trajectoryType": {
"type": "TrajectoryType",
"id": 21,
"options": {
"default": "UNKNOWN"
}
},
"targetLaneId": {
"rule": "repeated",
"type": "apollo.hdmap.Id",
"id": 23
},
"rssInfo": {
"type": "RSSInfo",
"id": 100
}
},
"nested": {
"RightOfWayStatus": {
"values": {
"UNPROTECTED": 0,
"PROTECTED": 1
}
},
"CriticalRegion": {
"fields": {
"region": {
"rule": "repeated",
"type": "apollo.common.Polygon",
"id": 1
}
}
},
"TrajectoryType": {
"values": {
"UNKNOWN": 0,
"NORMAL": 1,
"PATH_FALLBACK": 2,
"SPEED_FALLBACK": 3,
"PATH_REUSED": 4
}
}
}
},
"PlanningSemanticMapConfig": {
"fields": {
"resolution": {
......@@ -10532,6 +10532,134 @@
},
"hdmap": {
"nested": {
"Projection": {
"fields": {
"proj": {
"type": "string",
"id": 1
}
}
},
"Header": {
"fields": {
"version": {
"type": "bytes",
"id": 1
},
"date": {
"type": "bytes",
"id": 2
},
"projection": {
"type": "Projection",
"id": 3
},
"district": {
"type": "bytes",
"id": 4
},
"generation": {
"type": "bytes",
"id": 5
},
"revMajor": {
"type": "bytes",
"id": 6
},
"revMinor": {
"type": "bytes",
"id": 7
},
"left": {
"type": "double",
"id": 8
},
"top": {
"type": "double",
"id": 9
},
"right": {
"type": "double",
"id": 10
},
"bottom": {
"type": "double",
"id": 11
},
"vendor": {
"type": "bytes",
"id": 12
}
}
},
"Map": {
"fields": {
"header": {
"type": "Header",
"id": 1
},
"crosswalk": {
"rule": "repeated",
"type": "Crosswalk",
"id": 2
},
"junction": {
"rule": "repeated",
"type": "Junction",
"id": 3
},
"lane": {
"rule": "repeated",
"type": "Lane",
"id": 4
},
"stopSign": {
"rule": "repeated",
"type": "StopSign",
"id": 5
},
"signal": {
"rule": "repeated",
"type": "Signal",
"id": 6
},
"yield": {
"rule": "repeated",
"type": "YieldSign",
"id": 7
},
"overlap": {
"rule": "repeated",
"type": "Overlap",
"id": 8
},
"clearArea": {
"rule": "repeated",
"type": "ClearArea",
"id": 9
},
"speedBump": {
"rule": "repeated",
"type": "SpeedBump",
"id": 10
},
"road": {
"rule": "repeated",
"type": "Road",
"id": 11
},
"parkingSpace": {
"rule": "repeated",
"type": "ParkingSpace",
"id": 12
},
"pncJunction": {
"rule": "repeated",
"type": "PNCJunction",
"id": 13
}
}
},
"ClearArea": {
"fields": {
"id": {
......@@ -11103,134 +11231,6 @@
}
}
},
"Projection": {
"fields": {
"proj": {
"type": "string",
"id": 1
}
}
},
"Header": {
"fields": {
"version": {
"type": "bytes",
"id": 1
},
"date": {
"type": "bytes",
"id": 2
},
"projection": {
"type": "Projection",
"id": 3
},
"district": {
"type": "bytes",
"id": 4
},
"generation": {
"type": "bytes",
"id": 5
},
"revMajor": {
"type": "bytes",
"id": 6
},
"revMinor": {
"type": "bytes",
"id": 7
},
"left": {
"type": "double",
"id": 8
},
"top": {
"type": "double",
"id": 9
},
"right": {
"type": "double",
"id": 10
},
"bottom": {
"type": "double",
"id": 11
},
"vendor": {
"type": "bytes",
"id": 12
}
}
},
"Map": {
"fields": {
"header": {
"type": "Header",
"id": 1
},
"crosswalk": {
"rule": "repeated",
"type": "Crosswalk",
"id": 2
},
"junction": {
"rule": "repeated",
"type": "Junction",
"id": 3
},
"lane": {
"rule": "repeated",
"type": "Lane",
"id": 4
},
"stopSign": {
"rule": "repeated",
"type": "StopSign",
"id": 5
},
"signal": {
"rule": "repeated",
"type": "Signal",
"id": 6
},
"yield": {
"rule": "repeated",
"type": "YieldSign",
"id": 7
},
"overlap": {
"rule": "repeated",
"type": "Overlap",
"id": 8
},
"clearArea": {
"rule": "repeated",
"type": "ClearArea",
"id": 9
},
"speedBump": {
"rule": "repeated",
"type": "SpeedBump",
"id": 10
},
"road": {
"rule": "repeated",
"type": "Road",
"id": 11
},
"parkingSpace": {
"rule": "repeated",
"type": "ParkingSpace",
"id": 12
},
"pncJunction": {
"rule": "repeated",
"type": "PNCJunction",
"id": 13
}
}
},
"BoundaryEdge": {
"fields": {
"curve": {
......
......@@ -3,7 +3,9 @@
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const WebappWebpackPlugin = require('webapp-webpack-plugin');
// TODO: put favicons back after upgrading node >= 10.0.0 due to a potential security
// vulnerability in the url-regex package used in favicons-webpack-plugin
// const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
const ProgressBarPlugin = require("progress-bar-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
......@@ -190,11 +192,12 @@ module.exports = {
// Include only the app. Do not include the service worker.
chunks: ["app"]
}),
new WebappWebpackPlugin({
/*
new FaviconsWebpackPlugin({
logo: "./favicon.png",
cache: true,
prefix: "icons/"
}),
}),*/
new CopyWebpackPlugin([
{
from: '../node_modules/three/examples/fonts',
......
......@@ -3,7 +3,9 @@
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const WebappWebpackPlugin = require("webapp-webpack-plugin");
// TODO: put favicons back after upgrading node >= 10.0.0 due to a potential security
// vulnerability in the url-regex package used in favicons-webpack-plugin
// const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
const ProgressBarPlugin = require("progress-bar-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
......@@ -189,12 +191,12 @@ module.exports = {
template: "./index.hbs",
// Include only the app. Do not include the service worker.
chunks: ["offline"]
}),
new WebappWebpackPlugin({
}), /*
new FaviconsWebpackPlugin({
logo: "./favicon.png",
cache: true,
prefix: "icons/"
}),
}), */
new CopyWebpackPlugin([
{
from: '../node_modules/three/examples/fonts',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册