我们不会升级React版本。我们只需要配置上面的react版本。
我确实安装了以下软件包-
Package.json
{
"name": "app",
"version": "0.0.1",
"description": "",
"engines": {
"npm": ">=3",
"node": ">=5"
},
"scripts": {
"analyze:clean": "rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node ./internals/scripts/analyze.js",
"extract-intl": "babel-node --presets latest,stage-0 -- ./internals/scripts/extract-intl.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion",
"postinstall": "npm run build:dll",
"prebuild": "npm run build:clean",
"build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "npm run test:clean && rimraf ./build",
"build:dll": "node ./internals/scripts/dependencies.js",
"start": "cross-env NODE_ENV=development node server",
"server": …
Run Code Online (Sandbox Code Playgroud) 可以提交跨站点脚本(XSS)模式.
[HttpPost]
[AllowAnonymous]
[ValidateInput(false)]
public async Task<string> Index(string Xml) => await Process(Xml);
Run Code Online (Sandbox Code Playgroud)
如果我删除ValidateInput(false)Tag它会抛出异常."潜在的危险......"
Web.config设置如下
<httpRuntime targetFramework="4.6.1" requestValidationMode="2.0" />
Run Code Online (Sandbox Code Playgroud)
传入的请求将始终具有XML字符串.
是否有任何属性或某些东西不需要添加validateInput(False)并允许XMl.
请为您提供意见.
先感谢您.
security xss request-validation asp.net-mvc-validation client-side-attacks