| @@ 212-216 (lines=5) @@ | ||
| 209 | */ |
|
| 210 | if (isset($queryParams['downloadStartSecret'])) { |
|
| 211 | $token = $queryParams['downloadStartSecret']; |
|
| 212 | if (!isset($token[32]) |
|
| 213 | && \preg_match('!^[a-zA-Z0-9]+$!', $token) === 1) { |
|
| 214 | // FIXME: use $response->setHeader() instead |
|
| 215 | \setcookie('ocDownloadStarted', $token, \time() + 20, '/'); |
|
| 216 | } |
|
| 217 | } |
|
| 218 | } |
|
| 219 | ||
| @@ 502-508 (lines=7) @@ | ||
| 499 | * the content must not be longer than 32 characters and must only contain |
|
| 500 | * alphanumeric characters |
|
| 501 | */ |
|
| 502 | if (!empty($downloadStartSecret) |
|
| 503 | && !isset($downloadStartSecret[32]) |
|
| 504 | && \preg_match('!^[a-zA-Z0-9]+$!', $downloadStartSecret) === 1) { |
|
| 505 | ||
| 506 | // FIXME: set on the response once we use an actual app framework response |
|
| 507 | \setcookie('ocDownloadStarted', $downloadStartSecret, \time() + 20, '/'); |
|
| 508 | } |
|
| 509 | ||
| 510 | $this->emitAccessShareHook($share); |
|
| 511 | ||