sterling Tue Jul 1 20:56:32 2003 EDT
Modified files:
/php-src/ext/sqlite sess_sqlite.c
Log:
not necessary, already assumed binary safe (it has to be under the current
session architecture), and anything else is fair play
Index: php-src/ext/sqlite/sess_sqlite.c
diff -u php-src/ext/sqlite/sess_sqlite.c:1.7 php-src/ext/sqlite/sess_sqlite.c:1.8
--- php-src/ext/sqlite/sess_sqlite.c:1.7 Tue Jul 1 20:45:15 2003
+++ php-src/ext/sqlite/sess_sqlite.c Tue Jul 1 20:56:32 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sess_sqlite.c,v 1.7 2003/07/02 00:45:15 sterling Exp $ */
+/* $Id: sess_sqlite.c,v 1.8 2003/07/02 00:56:32 sterling Exp $ */
#include "php.h"
@@ -36,36 +36,6 @@
PS_MOD(sqlite)
};
-/* If you change the logic here, please also update the error message in
- * ps_sqlite_open() appropriately (code taken from ps_files_valid_key()) */
-
-static int ps_sqlite_valid_key(const char *key)
-{
- size_t len;
- const char *p;
- char c;
- int ret = 1;
-
- for (p = key; (c = *p); p++) {
- /* valid characters are a..z,A..Z,0..9 */
- if (!((c >= 'a' && c <= 'z')
- || (c >= 'A' && c <= 'Z')
- || (c >= '0' && c <= '9')
- || c == ','
- || c == '-')) {
- ret = 0;
- break;
- }
- }
-
- len = p - key;
-
- if (len == 0)
- ret = 0;
-
- return ret;
-}
-
PS_OPEN_FUNC(sqlite)
{
char *errmsg = NULL;
@@ -119,11 +89,6 @@
*val = NULL;
*vallen = 0;
- if (!ps_sqlite_valid_key(key)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLite: The session id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'");
- return FAILURE;
- }
-
query = sqlite_mprintf("SELECT value FROM session_data WHERE sess_id='%q'
LIMIT 1", key);
if (query == NULL) {
/* no memory */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php