This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8"> | |
<title><cfdump> is not vulnerable to XSS in its default configuration</title> | |
<style> | |
main { | |
margin-inline: auto; | |
max-width: 64ch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function assetQueryString ($filePath, $maxAge = 7) { | |
$today = intval(strtotime(date("Y-m-d")) / 86400); | |
$fileDate = intval(strtotime(date("Y-m-d", filemtime($_SERVER['DOCUMENT_ROOT'].$filePath))) / 86400); | |
$days = $today - $fileDate; | |
if ($days <= $maxAge) { | |
$filePath .= "?".$fileDate; | |
} | |
echo $filePath; | |
} |