BlueDragon.NET上的ColdFusion發生了一個奇怪的問題。由於StackOverflow用戶的廣泛經驗,在此處詢問。BlueDragon.NET上的ColdFusion特有錯誤
將發佈內容中的標籤移出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上,可能有一些消毒設置正在所有變量上使用?
建議,想法等在這個問題上受到歡迎。
好猜 - Adobe CF中的實際設置是服務器設置 - >設置 - >'啓用全局腳本保護'。 – 2010-11-17 12:23:49
原來不是一個設置,但開發人員的錯誤。我們的自定義標籤在工作時的工作方式非常類似於此。感謝您拍攝! – artlung 2010-11-18 21:52:52