zoukankan
html css js c++ java
一种简单的检测form非法字符串
protected
override
void
OnError(EventArgs e)
{
Exception lastException
=
this
.Server.GetLastError();
determin if it is HttpRequestValidationException
#region
determin if it is HttpRequestValidationException
if
( lastException
is
HttpRequestValidationException)
{
string
returnJS
=
string
.Format(
"
<script>alert('{0}');window.history.back();</script>
"
, Accor.Vel.CoreToolKit.Utilities.Language.GetResource(
"
InputError
"
,
this
.Page ) );
this
.Page.RegisterStartupScript( Guid.NewGuid().ToString().Replace(
"
-
"
,
""
), returnJS );
Response.Write( returnJS );
Server.ClearError();
return
;
}
}
在pagebase里面,catch住HttpRequestValidationException,处理一把就可以了~
查看全文
相关阅读:
关于unicode编码问题——[ASIS 2019]Unicorn shop
cve-2020-7066 ssrf漏洞——GKCTF2020
updatexml()报错注入——[极客大挑战 2019]HardSQL
用户名和密码分开检验产生的mysql注入——[GXYCTF2019]BabySQli
安恒月赛——Ezunserialize(反序列化字符逃逸)
记一次Flask模板注入学习 [GYCTF2020]FlaskApp
[CISCN2019 华北赛区 Day2 Web1]Hack World
[SUCTF 2019]CheckIn(user.ini文件构成的php后门)
sql注入用<>绕过被过滤的select ——百度杯9月第二场SQL
剑指offer32 从上到下打印二叉树(叁)
原文地址:https://www.cnblogs.com/jinweijie/p/1219288.html
最新文章
算式与逆波兰式
windows时间不准,无法使用授时服务器进行同步
电脑无法正常关闭,休眠或睡眠
车站建造问题
Pycharm+PyQt5环境搭建
爬楼梯
递归与汉诺塔问题
数组和链表
二分查找
python修饰器
热门文章
arm-linux-androideabi-ld.exe: final link failed: Memory exhausted
如何申请Delphi QC用户
图文解说 ChinaCock CCX5WebView
Delphi用WebBrowser显示网页遇到的问题及用CCX5WebView解决
对webview和升级注意事项的全面解释
基于jwt制作Token
海康威视及大华技术SDK C头文件转Delphi Pas文件
uniGUI新版终于支持Linux了
FreePascal 3.2.0发布了!
Mysql注入的常用方法和绕过
Copyright © 2011-2022 走看看