- Edited
Hi GuysWe've noticed that when we respond to a ticket and include inline images, the images expire after a about a day or so. When we return to a ticket the images not longer display. Here is a sanitized sample URL to an image in a ticket that has expired images.href="/file.php?key=XXXXXX&expires=1480464000&signature=XXXX&disposition=inline"The expiry date (1480464000) = Wed, 30 Nov 2016 00 GMTIf I open that link in my browser I get the following"Unknown or invalid file"So now when we open that ticket in the Agent area, the image is not displayed. We are using the S3 Plugin for storing images in S3.What I have found is the following function is returning false when the expires time is less than NOWFile = /osticket/include/class.file.phpfunction verifySignature($signature, $expires) { $gmnow = Misc:(); if ($expires < $gmnow) return false; $check = static:($this->getId(), $this->getKey(), $this->getSignature(), $expires); return $signature == $check; }This function is called from /osticket/file.php// Validate session access hash - we want to make sure the link is FRESH!// and the user has access to the parent ticket!!if ($file->verifySignature($_GET, $_GET)) { if (($s = @$_GET) && strpos($file->getType(), 'image/') === 0) return $file->display($s); // Download the file.. $file->download(@$_GET ?: false, $_GET);}// elseHttp:(404, __('Unknown or invalid file'));What I'm trying to understand is why is an expires value set on an image url that seems to be stored statically in the ticket record in the database and then have a line in class.file.php that returns false if expires value is less than NOW.My temporary fix for this at the moment is to simply comment out the following lines in class.file.php but I'm unsure what other issues that may cause.// if ($expires < $gmnow)// return false;Would appreciate some help in understanding this.Thanks