note 59363 deleted from function.session-set-save-handler by cmb
| From: | cmb@php.net | Date: | Sun, 24 Nov 2019 09:12:29 +0000 |
| Subject: | note 59363 deleted from function.session-set-save-handler by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213242@lists.php.net to get a copy of this message | ||
Note Submitter: bachir
----
php doesn't make any checks about PHPSESSID cookie format, it is then important to verify
cookie format before making any sql request.
if your read session request is :
SELECT DataValue FROM sessions WHERE SessionID='$aKey'
this generic cookie could succeed to access others session: PHPSESSID=1' OR SessionID LIKE
'%>>
for safety, you can make this verification before sql request:
if (! preg_match('/^([0-9a-f]{32})$/i',$aKey)) return NULL;
hope this can be helpful