在bluedragon.net上,我们遇到了一个奇怪的问题。在这里询问,因为Stackoverflow用户的丰富经验。

张贴在out blueDragon.net服务器上的标签已删除,我们不确定它在堆栈中被删除的位置。因此,例如,如果我们发布这些数据

[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>
><>

我们回来的是:

[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 范围并使用此代码,出现类似标签的内容:

<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作为引擎运行,因此也许在所有变量上都使用了一些消毒设置?

在这个问题上欢迎建议,想法等。

有帮助吗?

解决方案 2

原来是非常平凡的。

我们有一个自定义标签,可以进行自定义的字符串替换。在一台服务器上,它经过修改以不替换所有标签。在此服务器上,我们使用了一个旧版本。因此,BlueDragon JX和Bluedragon.net之间的故障并不是差异 - 这是开发人员团队错误。

其他提示

我没有方便检查的BD.NET实例,但是Adobe ColdFusion在CF管理员中有一个设置来剥离“无效标签”。那是我最好的猜测。 Adobe CF用“ InvalidTag”取代了它们,我的猜测是BD.NET只是静静地剥离它。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top