mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-02 11:36:08 -04:00
extracting only the 16 hex characters of the query string as paste ID, addressing #396
This commit is contained in:
parent
cc53d95ed1
commit
79a858f176
5 changed files with 7 additions and 5 deletions
|
@ -100,7 +100,9 @@ class Request
|
|||
array_key_exists('QUERY_STRING', $_SERVER) &&
|
||||
!empty($_SERVER['QUERY_STRING'])
|
||||
) {
|
||||
$this->_params['pasteid'] = $_SERVER['QUERY_STRING'];
|
||||
$this->_params['pasteid'] = preg_match(
|
||||
'/[a-f0-9]{16}/', $_SERVER['QUERY_STRING'], $match
|
||||
) ? $match[0] : 'invalid id';
|
||||
}
|
||||
|
||||
// prepare operation, depending on current parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue