Skip to content
Snippets Groups Projects
Commit 9840812d authored by Peter Rotich's avatar Peter Rotich
Browse files

Centralize link token management. CSRF protection for important links.

parent 1643e0d1
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,15 @@ class osTicket {
return false;
}
function getLinkToken() {
return md5($this->getCSRFToken().SECRET_SALT.session_id());
}
function validateLinkToken($token) {
return ($token && !strcasecmp($token, $this->getLinkToken()));
}
function isFileTypeAllowed($file, $mimeType='') {
if(!$file || !($allowedFileTypes=$this->getConfig()->getAllowedFileTypes()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment