Hi,

On 09.04.11 15:27, Tobias Pierschel wrote:

tmp.searchBox = HTML
tmp.searchBox.value(
<div id="topSearch">
        <form action="/index.php?id=23&no_cache=1&L={GPvar:L}" method="post"
enctype="multipart/form-data" id="quickSearchForm" name="quickSearchForm">
        </form>
   </div>
)

Was mache ich falsch?

U.a. sorgst Du Dich nicht um die Sicherheit Deiner Site? ;)

Folgende Fehler kann ich entdecken:

1. Verwendung von getdata ohne .insertData = 1
   (funktionaler Fehler, daher geht es nicht wie Du es erwartest)
2. Hardcoded link
   (Unschönheit bei Verwendung von realurl o.ä.)
3. Fehlendes htmlSpecialchars = 1 bzw. intval = 1 für Benutzereingabe
   (sicherheitsrelevant)
4. no_cache ist ein Performancefresser
   (nicht nötig wenn die Suche ein USER_INT plugin ist)

Lösung:

tmp.searchBox = TEXT
tmp.searchBox.typolink.parameter = 23
tmp.searchBox.typolink.additionalParams = &no_cache=1
tmp.searchBox.typolink.returnLast = url
tmp.searchBox.htmlSpecialChars = 1
tmp.searchBox.wrap (
<div id="topSearch">
         <form action="|" method="post"
enctype="multipart/form-data" id="quickSearchForm" name="quickSearchForm">
         </form>
  </div>
)

Und wenn Du schon dabei bist, setze (falls noch nicht getan) linkVars folgendermaßen:

config.linkVars = L(int)

HTH

Viele Grüße,
Helmut

--
Helmut Hummel
TYPO3 Security Team Leader, TYPO3 v4 Core Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an