首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BlueDragon.NET上的ColdFusion出现特殊错误

BlueDragon.NET上的ColdFusion出现特殊错误
EN

Stack Overflow用户
提问于 2010-11-17 06:12:06
回答 2查看 177关注 0票数 0

我们在BlueDragon.NET上遇到了一个奇怪的问题,因为StackOverflow用户有丰富的经验,所以我们在这里询问。

到外部BlueDragon.NET服务器的POSTed内容中的标签被删除,我们不确定它在堆栈中的什么位置被删除。举个例子,如果我们发布这个数据

代码语言:javascript
复制
[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>
><>

我们得到的结果是:

代码语言:javascript
复制
[CORE]
Lesson_Status=Incomplete
Lesson_Location=comm_13_a02_bs_enus_t17s06v01
score=
time=00:00:56
[Core_Lesson]



hello1
hello2
hello3
hello4
hello5
hello6


hello10

>

也就是说,任何以<开头和以>结尾的内容都会被剥离或过滤,并且在发布时不再出现在ColdFusion的FORM范围内。

我们安装了BlueDragon JX的服务器不会遇到这个问题。

如果我们不使用默认的FORM作用域,而是使用以下代码,则会出现类似标记的内容:

代码语言:javascript
复制
<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#">

如果我们这样做,并使用创建的BetterFORM变量,它就在那里,所以在堆栈中的其他位置过滤请求似乎不是问题。我在想可能是URLScan,但它似乎没有安装。由于BD.NET作为引擎在.NET上运行,也许有一些清理设置正在以某种方式在所有变量上使用?

欢迎在这个问题上提出建议、想法等。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-11-19 05:51:50

它被证明是非常平凡的。

我们有一个定制的标签,可以进行定制的字符串替换。在一台服务器上,它被修改为不替换所有标签。在这台服务器上,我们使用的是一个更老的版本。因此,故障不是BlueDragon JX和BlueDragon.NET之间的区别--而是开发人员团队的错误。

票数 0
EN

Stack Overflow用户

发布于 2010-11-17 09:39:47

我手头没有可以检查的BD.NET实例,但是Adobe ColdFusion在cf管理员中有一个删除“无效标签”的设置。这是我最好的猜测。Adobe CF将它们替换为"invalidTag",我猜BD.Net只是悄悄地剥离了它。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4199564

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档