mirror of
https://github.com/opencultureconsulting/simple-oai-pmh.git
synced 2025-03-09 00:00:20 +01:00
Check validity of resumption token by filemtime
This commit is contained in:
parent
f916082fdc
commit
008d5599c4
@ -169,10 +169,10 @@ class OAI2Server {
|
||||
if (count($this->args) > 1) {
|
||||
$this->errors[] = new OAI2Exception('badArgument');
|
||||
} else {
|
||||
if ((int)$this->args['resumptionToken']+$this->token_valid < time()) {
|
||||
if (!file_exists($this->token_prefix.$this->args['resumptionToken'])) {
|
||||
$this->errors[] = new OAI2Exception('badResumptionToken');
|
||||
} else {
|
||||
if (!file_exists($this->token_prefix.$this->args['resumptionToken'])) {
|
||||
if (filemtime($this->token_prefix.$this->args['resumptionToken'])+$this->token_valid < time()) {
|
||||
$this->errors[] = new OAI2Exception('badResumptionToken');
|
||||
} else {
|
||||
if ($readings = $this->readResumptionToken($this->token_prefix.$this->args['resumptionToken'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user