Quando vengono presentati i Web Controls nel Self-Paced Training Kit dell'esame 70-528, si parla dei rischi del Cross Site Scripting. Per fare una prova, ho inserito in una TextBox il seguente contenuto:
<script>altert("Ciao");</script>
Effettuando il post della pagina (attraverso la pressione di un pulsante), ho ottenuto il seguente messaggio di errore di ASP .NET:
A potentially dangerous Request.Form value was detected from the client (TextBox1="<script>altert("Ciao...").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Il messaggio informa che, per evitare questo errore, dopo aver disabilitato il controllo di sicurezza è necessario eseguire manualmente la validazione dell'input. Per fortuna, questo compito è molto semplice da realizzare: basta utilizzare il metodo Server.HtmlEncode per trasformare l'input in un formato "sicuro" per la visualizzazione sulla pagina. Ad esempio:
Label1.Text = Server.HtmlEncode(TextBox1.Text);
In questo modo, il testo inserito nella TextBox viene codificato in HTML come:
<script>altert("Ciao");</script>
e dunque non risulta eseguibile.
Dopo una sola versione beta, è stata già rilasciata la release 3.71 di WinRAR. Queste le novità:
- Archive names in rar.log error log file always include the full path.
- WinRAR tray icon is compatible with high DPI display modes.
- If you modified a file in archive with encrypted names using an external editor, WinRAR will not ask for archive password again when prompting to update a file. It will use a password which you entered when opening an archive.
- Bugs fixed:
- switch -tl and "Set archive time to latest file time" option could fail in previous version. Sometimes they set archive time to current system time instead of latest file time;
- if -ag switch mask contained archive number, month and minute characters, WinRAR placed 'I' character instead of minute value into generated archive name for archive numbers exceeding 1;
- high ASCII names in ISO files using ISO 9660 format without Joliet format extension were displayed incorrectly;
- WinRAR could crash when decompressing some of corrupt RAR archives;
- if "Turn PC off when done" option was set in "Convert archives" command, WinRAR turned PC off after converting the first archive in selected group instead of after converting the entire group;
- if user specified a non-existent destination path in SFX archive in Vista, SFX could enter into infinite "create new SFX window" loop;
- WinRAR could fail to unpack an individual file from subfolder of ACE archive using the drag and drop.
Il download della versione inglese è disponibile qui. A questo indirizzo, invece, è possibile scaricare la versione italiana. Insieme alla nuova versione è stato rilasciato anche un update per il tema Windows Vista Ultimate, che potete trovare qui.
Technorati Tags:
Programs,
Updates