Peculiar Fehler mit Coldfusion auf BlueDragon.NET
-
11-10-2019 - |
Frage
Wir haben ein ungeradees Problem bekommen mit Coldfusion auftritt auf BlueDragon.NET. Erkundigung hier wegen der breiten Erfahrung von Stackoverflow Benutzer.
Tags innerhalb POSTed Inhalte aus BlueDragon.NET Server entfernt werden, und wir sind nicht sicher, wo in dem Stapel wird es entfernt zu werden. So zum Beispiel, wenn wir diese Daten veröffentlichen
[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>
><>
Was wir zurück, ist dies:
[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
>
Das heißt, alles, was das beginnt mit <
und endet mit >
abgestreift zu werden oder gefiltert und erscheint nicht mehr in FORM
Umfang Coldfusion, wenn es geschrieben.
Unser Server mit Bluedragon JX dieses Problem nicht betroffen.
Wenn wir Bypass den Standard FORM
Umfang verwenden und diesen Code zu verwenden, der Tag-wie Inhalt angezeigt wird:
<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#">
Wenn wir dies tun, und verwenden Sie die erstellte BetterFORM
Variable, dass es da ist, so ist es kein Problem mit den Anfragen an anderer Stelle gefiltert werden in dem Stapel zu sein scheint. Ich dachte, vielleicht war es URLScan, aber das scheint nicht installiert werden. Da BD.NET auf .NET als der Motor läuft, vielleicht gibt es einige sanitization Einstellung, die irgendwie auf alle Variablen verwendet wird?
Anregungen, Ideen, etc. sind willkommen zu diesem Thema.
Lösung 2
Es stellte sich sehr banal sein, aus.
Wir hatten einen benutzerdefinierten Tag, die String-Ersetzungen angepasst hat. Auf einem Server wurde geändert Alle Tags nicht zu ersetzen. Auf diesem Server verwenden wir eine ältere Version, die tat. So ist der Fehler kein Unterschied zwischen Bluedragon JX und BlueDragon.NET war -. Es war Entwicklerteam Fehler
Andere Tipps
Ich habe nicht eine BD.NET Instanz praktisch zu überprüfen, aber Adobe Coldfusion hat eine Einstellung im cf Administrator „ungültige Tags“ abzustreifen. Das ist meine beste Vermutung. Adobe CF ersetzt sie durch „invalidTag“, meine Vermutung ist, dass BD.Net streift er nur still.