svn: /phpdoc/en/trunk/reference/mongodb/ security.xml

From: Date: Sat, 09 Jul 2016 18:27:25 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongodb/ security.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-14299@lists.php.net to get a copy of this message
jmikola Sat, 09 Jul 2016 18:27:25 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=339600 Log: PHPC-708: Fix structure and refs in MongoDB security articles Changed paths: U phpdoc/en/trunk/reference/mongodb/security.xml Modified: phpdoc/en/trunk/reference/mongodb/security.xml =================================================================== --- phpdoc/en/trunk/reference/mongodb/security.xml 2016-07-09 18:12:26 UTC (rev 339599) +++ phpdoc/en/trunk/reference/mongodb/security.xml 2016-07-09 18:27:25 UTC (rev 339600) @@ -4,7 +4,7 @@ <book xml:id="mongodb.security" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Security</title> - <article> + <article xml:id="mongodb.security.request_injection"> <title>Request Injection Attacks</title> <para> If you are passing <literal>$_GET</literal> (or <literal>$_POST</literal>) @@ -31,13 +31,13 @@ <para> This is a fairly easy attack to defend against: make sure $_GET and $_POST parameters are the type you expect before you send them to the database. - PHP has the <function>filter_var_</function> to assist with this. + PHP has the <function>filter_var</function> function to assist with this. </para> <para> Note that this type of attack can be used with any databases interation that - locates a document, including updates, upserts, find-and-modifies, and - removes. + locates a document, including updates, upserts, deletes, and findAndModify + commands. </para> <para> @@ -46,15 +46,15 @@ </para> </article> - <article> + <article xml:id="mongodb.security.script_injection"> <title>Script Injection Attacks</title> <para> If you are using JavaScript, make sure that any variables that cross the PHP- to-JavaScript boundry are passed in the <literal>scope</literal> field of - <classname>MongoCode</classname>, not interpolated into the JavaScript - string. This can come up when using <literal>$where</literal> clauses, - MapReduce, group-bys, and any other time you may pass JavaScript into the - database. + <classname>MongoDB\BSON\Javascript</classname>, not interpolated into the + JavaScript string. This can come up when using <literal>$where</literal> + clauses in queries, mapReduce and group commands, and any other time you may + pass JavaScript into the database. </para> <para> For example, suppose we have some JavaScript to greet a user in the database

« previous php.doc.cvs (#14299) next »