Asp.net BlueDragon.NET上ColdFusion的特殊错误
BlueDragon.NET上的ColdFusion出现了一个奇怪的问题。在这里提问是因为StackOverflow用户的广泛经验 发布到BlueDragon.NET服务器的内容中的标签被删除,我们不确定它在堆栈中的什么位置被删除。例如,如果我们发布这些数据Asp.net BlueDragon.NET上ColdFusion的特殊错误,asp.net,coldfusion,bluedragon,Asp.net,Coldfusion,Bluedragon,BlueDragon.NET上的ColdFusion出现了一个奇怪的问题。在这里提问是因为StackOverflow用户的广泛经验 发布到BlueDragon.NET服务器的内容中的标签被删除,我们不确定它在堆栈中的什么位置被删除。例如,如果我们发布这些数据 [CORE] Lesson_Status=Incomplete Lesson_Location=comm_13_a02_bs_enus_t17s06v01 score= time=00:00:56 [Core_Lesson] <sd
[CORE]
Lesson_Status=Incomplete
Lesson_Location=comm_13_a02_bs_enus_t17s06v01
score=
time=00:00:56
[Core_Lesson]
<sd ac="" pc="7.0" at="1289834380459" ct="" ><t id="lo8" sc=";;" st="c" /></sd>
<sd ac='' pc='7.0' at='1289834380459' ct='' ><t id='lo8' sc=';;' st='c' /></sd>
<sd ac="" pc="7.0" at="1289834380459" ct="" ><t id="lo8" sc=";;" st="c" /></sd>
<sd ac="" pc="7.0" at="1289834380459" ct="" ><t id="lo8" sc=";;" st="c" /></sd>
<b>hello1</b>
<i>hello2</i>
<table border><td>hello3</td></table>
<sd>hello4</sd>
<sd ac="1">hello5</sd>
<t>hello6</t>
<t />
<t attr="hello8" />
<strong>hello10</strong>
<img>
><>
也就是说,任何以
结尾的内容都将被剥离或过滤,并且在发布时不再出现在ColdFusion的表单
范围中
我们使用BlueDragon JX的服务器不会遇到此问题
如果我们绕过使用默认的表单
范围并使用此代码,则会出现类似标记的内容:
<cfscript>
// get the content string of the raw HTTP headers, will include all POST content as a long querystring
RAWREQUEST = GetHttpRequestData();
// split the string on "&" character, each variable should now be separate
// note that at this point duplicate variables will get clobbered
RAWFORMFIELDS = ListToArray(RAWREQUEST.content, "&");
// We're creating a structure like "FORM", but better
BetterFORM = StructNew();
// Go over each of the raw form fields, take the key
// and add it as a key, and decode the value into the value field
// and trap the whole thing if for some reason garbage gets in there
for(i=1;i LTE ArrayLen(RAWFORMFIELDS);i = i + 1) {
temp = ListToArray(RAWFORMFIELDS[i], "=");
try {
tempkey = temp[1];
tempval = URLDecode(temp[2]);
StructInsert(BetterFORM, tempkey, tempval);
} catch(Any e) {
tempThisError = "Malformed Data: " & RAWFORMFIELDS[i];
// Log the value of tempThisError here?
// WriteOutput(tempThisError);
}
}
</cfscript>
<cfdump var="#BetterFORM#">
//获取原始HTTP头的内容字符串,将所有POST内容作为一个长查询字符串包含
RAWREQUEST=GetHttpRequestData();
//拆分“&”字符上的字符串,每个变量现在应该是分开的
//请注意,此时重复变量将被删除
RAWFORMFIELDS=ListToArray(RAWREQUEST.content,&);
//我们正在创建一个类似“形式”的结构,但更好
BetterFORM=StructNew();
//检查每个原始表单字段,获取密钥
//并将其添加为键,然后将值解码到值字段中
//如果因为某种原因垃圾进了里面,就把整个东西都困在里面
对于(i=1;i LTE ArrayLen(RAWFORMFIELDS);i=i+1){
temp=ListToArray(RAWFORMFIELDS[i],“=”);
试一试{
tempkey=temp[1];
tempval=URLDecode(temp[2]);
StructInsert(BetterFORM、tempkey、tempval);
}捕获(任何e){
试探hiserror=“格式错误的数据:&RAWFORMFIELDS[i];
//在此处记录错误的值?
//写输出(错误);
}
}
如果我们这样做,并使用创建的BetterFORM
变量,它就在那里,因此在堆栈中的某个其他点过滤请求似乎没有问题。我想可能是URLScan,但似乎没有安装。由于BD.NET作为引擎在.NET上运行,可能在所有变量上都使用了某种净化设置
欢迎对此问题提出建议、想法等。我手头上没有BD.NET实例可供检查,但Adobe ColdFusion在cf管理员中有一个设置,用于去除“无效标记”。这是我最好的猜测。Adobe CF将其替换为“invalidTag”,我的猜测是BD.Net只是默默地将其剥离。结果证明它非常平凡
我们有一个定制的标签,用于定制字符串替换。在一台服务器上,它被修改为不替换所有标记。在这台服务器上,我们使用的是一个旧版本。因此,故障并不是BlueDragon JX和BlueDragon.NET之间的区别,而是开发人员团队的错误。猜得好-Adobe CF中的实际设置是服务器设置->设置->启用全局脚本保护。结果不是设置,而是开发人员的错误。我们的自定义标记的工作方式,当它工作时,非常像这样。谢谢你的拍摄!
<cfscript>
// get the content string of the raw HTTP headers, will include all POST content as a long querystring
RAWREQUEST = GetHttpRequestData();
// split the string on "&" character, each variable should now be separate
// note that at this point duplicate variables will get clobbered
RAWFORMFIELDS = ListToArray(RAWREQUEST.content, "&");
// We're creating a structure like "FORM", but better
BetterFORM = StructNew();
// Go over each of the raw form fields, take the key
// and add it as a key, and decode the value into the value field
// and trap the whole thing if for some reason garbage gets in there
for(i=1;i LTE ArrayLen(RAWFORMFIELDS);i = i + 1) {
temp = ListToArray(RAWFORMFIELDS[i], "=");
try {
tempkey = temp[1];
tempval = URLDecode(temp[2]);
StructInsert(BetterFORM, tempkey, tempval);
} catch(Any e) {
tempThisError = "Malformed Data: " & RAWFORMFIELDS[i];
// Log the value of tempThisError here?
// WriteOutput(tempThisError);
}
}
</cfscript>
<cfdump var="#BetterFORM#">