note 125179 added to sqlite3.escapestring
| From: | gniewekciolek at gmail dot com | Date: | Thu, 09 Jul 2020 07:09:09 +0000 |
| Subject: | note 125179 added to sqlite3.escapestring | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214850@lists.php.net to get a copy of this message | ||
What if we escape \' string with backslash? I don't think it's working.
<?php
$someQuery = 'WHERE "password"=\'%s\''
$someString = '\\\' OR true=true --';
$escapedString = SQLite3::escapeString('\\\' OR true=true --');
echo sprintf($someQuery, $escapedString); // WHERE "password"='\'' OR
true=true --'
----
Server IP: 45.112.84.4
Probable Submitter: 103.51.166.36 (proxied: 91.199.25.153)
----
Manual Page -- http://php.net/manual/en/sqlite3.escapestring.php
Edit -- https://master.php.net/note/edit/125179
Del: integrated -- https://master.php.net/note/delete/125179/integrated
Del: useless -- https://master.php.net/note/delete/125179/useless
Del: bad code -- https://master.php.net/note/delete/125179/bad+code
Del: spam -- https://master.php.net/note/delete/125179/spam
Del: non-english -- https://master.php.net/note/delete/125179/non-english
Del: in docs -- https://master.php.net/note/delete/125179/in+docs
Del: other reasons-- https://master.php.net/note/delete/125179
Reject -- https://master.php.net/note/reject/125179
Search -- https://master.php.net/manage/user-notes.php