The Zend Framework Guide reports the following:
60.3.1. Output outputOne of the most important tasks to perform in a script view is to make sure that the output is escaped correctly; among other things, it helps to avoid cross-site scripting. If you are not using a function, method, or helper that avoids on its own, you should always avoid variables when outputting them.
60.3.1. Output output
One of the most important tasks to perform in a script view is to make sure that the output is escaped correctly; among other things, it helps to avoid cross-site scripting. If you are not using a function, method, or helper that avoids on its own, you should always avoid variables when outputting them.
Why is it always? Why do I need to avoid variables that have not been created or modified by the user?
. , , - " ", . , ? . -, , ..
, , , HTML, XML, JSON - .
, -, , . , , . , , , , .
, $this->escape($variableToEscape) .
$this->escape($variableToEscape)
- , , , , . .
: HTML-, , .
, , :
foo <b>bar</b>
, HTML-, , , HTML. , ( ), , .
, ,
foo & <b>bar</b>
- ; , :
foo & <b>bar</b>
, - , HTML. "" , . , "" < bob@bob.com > ". , < bob@bob.com > .
, , , XSS. , , , , , , ... , , XSS-, - , (, , - - , - , ), XSS.
.
: MVC , "", . , , , ?
, (, , XML ), .
, / , , , , , , .
Source: https://habr.com/ru/post/1712174/More articles:How to stop direct php page execution using htaccess rules? - phpIs there a more efficient way to reconcile large data sets? - optimizationdjango "manage.py index" не выполняется как задание cron - djangoCode completion for PHP extensions in Zend Studio? - phpThe fight against generics and classes - javaModel classes do not appear in the Add View dialog box - asp.net-mvcUNIX wrapper in PHP - unixASP.NET MVC Problem creating a strongly typed view - asp.netWhat is the advantage of splitting aggregator and parent projects? - maven-2https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1712179/how-much-disk-space-should-i-reserve-for-my-subversion-repository&usg=ALkJrhj4y8lOQbTt-DDPjBUDmbCBpHBioQAll Articles