Skip to content

Commit 89846f0

Browse files
authored
Merge pull request #735 from OpenKnowledgeMaps/security-updates
security bugfixes
2 parents 12ab7c8 + 8e6b5ce commit 89846f0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

server/services/displayPDF.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<head>
3-
<meta http-equiv="refresh" content="0; url=pdf.js-hypothes.is/viewer/web/viewer.html?file=<?php echo $_GET["file"] ?>" />
3+
<meta http-equiv="refresh" content="0; url=pdf.js-hypothes.is/viewer/web/viewer.html?file=<?php echo htmlspecialchars($_GET["file"]) ?>" />
44
</head>
55
<body>
66
</body>

server/services/snapshot/headstart_snapshot.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body style="margin:0px; padding:0px">
99

1010
<div id="visualization"></div>
11-
<script type="text/javascript" src="data-config_<?php echo $_GET['service'] ?>.js"></script>
11+
<script type="text/javascript" src="data-config_<?php echo htmlspecialchars($_GET['service']) ?>.js"></script>
1212
<script src="../../../../js/search_options.js"></script>
1313
<script>
1414
data_config.files = [{
@@ -18,7 +18,7 @@
1818
data_config.server_url = window.location.href.replace(/[^/]*$/, '') + "../../";
1919
data_config.show_context = true;
2020
data_config.create_title_from_context= true;
21-
data_config.options = options_<?php echo $_GET['service']; ?>.dropdowns;
21+
data_config.options = options_<?php echo htmlspecialchars($_GET['service']); ?>.dropdowns;
2222
if (<?php echo json_encode($_GET['service']) ?> === "linkedcat" ||
2323
<?php echo json_encode($_GET['service']) ?> === "linkedcat_authorview" ||
2424
<?php echo json_encode($_GET['service']) ?> === "linkedcat_browseview") {

0 commit comments

Comments
 (0)